login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224627 Prime numbers p such that 2*p^3-1, 2*p*q^2-1, 2*p*r^2-1, and 2*p*s^2-1 are prime numbers. 0

%I #17 Apr 22 2013 12:11:17

%S 19460899,86276401,87980803,167646631,300722029,343507111,479516311,

%T 906597943,998757829,1031308249,1112697199,1311383431,1962194053

%N Prime numbers p such that 2*p^3-1, 2*p*q^2-1, 2*p*r^2-1, and 2*p*s^2-1 are prime numbers.

%C Subsequence of A224612, p = prime(n) when A224612(n)=1.

%t Reap[ For[p = 2, p < 2*10^9, p = NextPrime[p], If[PrimeQ[q = 2*p^3 - 1] && PrimeQ[r = 2*p*q^2 - 1] && PrimeQ[s = 2*p*r^2 - 1] && PrimeQ[2*p*s^2 - 1], Print[p]; Sow[p]] ]][[2, 1]] (* _Jean-François Alcover_, Apr 22 2013 *)

%o (PFGW & SCRIPTIFY)

%o SCRIPT

%o DIM n,1

%o DIM q

%o DIMS t

%o OPENFILEOUT myf,a(n).txt

%o LABEL a

%o SET n,n+1

%o SETS t,%d\,;p(n)

%o SET q,2*p(n)^3-1

%o PRP q,t

%o IF ISPRP THEN GOTO b

%o GOTO a

%o LABEL b

%o SET q,2*p(n)*q^2-1

%o PRP q,t

%o IF ISPRP THEN GOTO c

%o GOTO a

%o LABEL c

%o SET q,2*p(n)*q^2-1

%o PRP q,t

%o IF ISPRP THEN GOTO d

%o GOTO a

%o LABEL d

%o SET q,2*p(n)*q^2-1

%o PRP q,t

%o IF ISPRP THEN GOTO e

%o GOTO a

%o LABEL e

%o WRITE t,myf

%o GOTO a

%Y Cf. A224612, A224613, A224614, A224626.

%K nonn

%O 1,1

%A _Pierre CAMI_, Apr 12 2013

%E More terms from _Jean-François Alcover_, Apr 22 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 10:54 EDT 2024. Contains 371241 sequences. (Running on oeis4.)