OFFSET
1,1
COMMENTS
Subsequence of A245639.
For P < 150000000 in this sequence, 8*(8*(8*P^2)^2-1)^2-1)^2-1 is composite.
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
2 is prime, 8*2^2-1=31 is prime, 8*31^2-1=7687 is prime, so 2 is in the sequence.
MATHEMATICA
f[n_]:=8 n^2 - 1; Select[Prime[Range[3000]], PrimeQ[f[#]]&&PrimeQ[f[f[#]]]&] (* Vincenzo Librandi, Sep 08 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM i
DIM j, 0
DIM n, 0
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET j, j+1
SETS t, %d\ ; p(j)
SET i, 8*p(j)^2-1
PRP i, t
IF ISPRP THEN GOTO a
GOTO loop1
LABEL a
SET i, 8*i^2-1
PRP i, t
IF ISPRP THEN GOTO b
GOTO loop1
LABEL b
WRITE myf, t
GOTO loop1
(PARI)
f(x) = 8*x^2-1;
forprime(p=1, 10^8, if(ispseudoprime(f(p)) && ispseudoprime(f(f(p))), print1(p, ", "))) \\ Derek Orr, Jul 29 2014
(Magma) [p: p in PrimesUpTo(25000)| IsPrime(8*p^2-1)and IsPrime(512*p^4-128*p^2+7)]; // Vincenzo Librandi, Sep 08 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Pierre CAMI, Jul 29 2014
STATUS
approved