Determine all possible value(s) of a prime number p such that each of (p+5)/8 and (p+1)/4 is a prime number.
list
5 P=1
10 while P>0
20 P=nxtprm(P)
30 P1=(P+5)//8:P2=(P+1)//4
40 if P1=int(P1) and P2=int(P2) then
50 :if prmdiv(P1)=P1 and prmdiv(P2)=P2 then
60 :print P;P1;P2
70 wend
OK
run
3 1 1
11 2 3
19 3 5
Break in 20
?p
485582459
OK
so it would seem that 3, 11 and 19 are the only values. They are definitely the only values lower than 485,582,459.
|
Posted by Charlie
on 2010-04-12 12:27:00 |