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!)
A224626 Primes p such that q=2*p^3-1, r=2*p*q^2-1, and s=2*p*r^2-1 are all prime. 3

%I

%S 27361,65731,167623,424093,1559449,2389693,3880633,4683661,5755921,

%T 5780881,6124411,6840643,7802959,7822879,7917769,8876719,9488683,

%U 9640321,9966139,10392073,10865083,10988743,12363991,12457681,12756253,13471561,14437561,14508709,14550331,14839711,15366223,16574143

%N Primes p such that q=2*p^3-1, r=2*p*q^2-1, and s=2*p*r^2-1 are all prime.

%C A prime p here is prime p(n) when A224611(n) = 1.

%C A subsequence of A224614. - _M. F. Hasler_, Apr 22 2013

%H Pierre CAMI, <a href="/A224626/b224626.txt">Table of n, a(n) for n = 1..747</a>

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

%t apQ[n_]:=Module[{q=2n^3-1,r},r=2n q^2-1;And@@PrimeQ[{q,r,2n r^2-1}]]; Select[ Prime[Range[1100000]],apQ] (* _Harvey P. Dale_, Nov 24 2013 *)

%o (PFGW SCRIPT)

%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 WRITE myf,t

%o GOTO a

%Y Cf. A224611, A224613, A224614.

%K nonn

%O 1,1

%A _Pierre CAMI_, Apr 12 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 August 18 02:34 EDT 2022. Contains 356204 sequences. (Running on oeis4.)