login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A245659
Prime numbers P such that Q=2*P^2-1, R=2*Q^2-1, S=2*R^2-1 and T=2*S^2-1 are all prime numbers.
1
281683, 496789, 823421, 1352753, 1719217, 6174109, 8643149, 9761051, 9843529, 16191167, 19132121, 19745797, 23490473, 28457797, 31820429, 32860271, 36552277, 37068569, 43506569, 44776981, 46808903, 55035047, 55957807, 67194403, 75099137, 83092897, 86580421, 89135089
OFFSET
1,1
COMMENTS
Subsequence of A106483.
For P = 496789, 83092897, 467014643, U=2*T^2-1 is also prime. [Corrected by Jens Kruse Andersen, Aug 21 2014]
LINKS
EXAMPLE
281683 is prime P.
Q=2*P^2-1 = 158690624977 is prime Q.
R=2*Q^2-1 = 50365428911181712501057 is prime R.
S=2*R^2-1 = 5073352858814597404058971422301788780452234497 is prime S.
T=2*S^2-1 = 51477818460084496601334991724899650493354568309112026195311592373475872924903206720553686017 is prime T.
U=2*T^2-1 is composite.
MATHEMATICA
f[n_]:=2n^2-1; Select[Prime[Range[5170000]], PrimeQ[f[#]]&&PrimeQ[f[f[#]]]&&PrimeQ[f[f[f[#]]]]&&PrimeQ[f[f[f[f[#]]]]]&] Farideh Firoozbakht, Aug 11 2014
Select[Prime[Range[52*10^5]], AllTrue[Rest[FoldList[2#^2-1&, {#, #, #, #, #}]], PrimeQ]&] (* Harvey P. Dale, Jan 13 2023 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM i
DIM j
DIM k
DIM n, 0
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SETS t, %d, %d\,; n; p(n)
PRP 2*p(n)^2-1, t
IF ISPRP THEN GOTO a
GOTO loop1
LABEL a
SET i, 2*p(n)^2-1
PRP 2*i^2-1, t
IF ISPRP THEN GOTO b
GOTO loop1
LABEL b
SET j, 2*i^2-1
PRP 2*j^2-1, t
IF ISPRP THEN GOTO c
GOTO loop1
LABEL c
WRITE myf, t
SET k, 2*j^2-1
PRP 2*k^2-1
IF ISPRP THEN GOTO d
GOTO loop1
LABEL d
WRITE myf, t
GOTO loop1
(PARI)
f(x)=return(2*x^2-1)
forprime(p=1, 10^8, if(ispseudoprime(f(p)) && ispseudoprime(f(f(p))) && ispseudoprime(f(f(f(p)))) && ispseudoprime(f(f(f(f(p))))), print1(p, ", "))) \\ Derek Orr, Jul 28 2014
CROSSREFS
Cf. A106483.
Sequence in context: A254740 A131263 A235173 * A321055 A185886 A235827
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 28 2014
EXTENSIONS
More terms from Derek Orr, Jul 28 2014
STATUS
approved