login
A257551
Primes p such that q=p^2-2 and r=q^2-2 are also prime.
3
2, 3, 7, 19, 37, 89, 211, 223, 257, 797, 1021, 1051, 1153, 1619, 2087, 2297, 3299, 3359, 3709, 3943, 4093, 4229, 4349, 4451, 4621, 5119, 5209, 5923, 6323, 6361, 7229, 7589, 8731, 8867, 9127, 9697, 9721, 9907, 10009, 10289, 10729, 11149, 11437, 11699, 11933
OFFSET
1,1
COMMENTS
Primes p that remain prime under two iterations of the map p => p^2-2. Note that p=2 is a fixed point of this map.
First primes >2 that remain prime under three iterations of the map p => p^2-2, are 3, 3299, 6323, 9127, 9697, 26357 (A257552).
LINKS
EXAMPLE
p=3, q=7, r=47 all prime,
p=7, q=47, r=2207 all prime,
p=19, q=359, r=128879 all prime.
MAPLE
filter:= proc(p) local q;
if not isprime(p) then return false fi;
q:= p^2-2;
isprime(q) and isprime(q^2-2)
end proc:
select(filter, [2, seq(i, i=3..20000, 2)]); # Robert Israel, Oct 31 2019
MATHEMATICA
Select[Prime@ Range@ 2000, PrimeQ[#^2 - 2] && PrimeQ[Nest[#^2 - 2 &, #, 2]] &] (* Michael De Vlieger, Apr 29 2015 *)
Select[Prime@Range@2000, PrimeQ[#^2 - 2] && PrimeQ[#^4 -4 #^2 + 2] &] (* Vincenzo Librandi, Apr 30 2015 *)
PROG
(Magma) [p: p in PrimesUpTo(15000)| IsPrime(p^4-4*p^2+2)and IsPrime(p^2-2)]; // Vincenzo Librandi, Apr 30 2015
(PARI) forprime(p=1, 10^4, if(isprime(q=p^2-2)&&isprime(q^2-2), print1(p, ", "))) \\ Derek Orr, Apr 30 2015
CROSSREFS
Subsequence of A062326. A257552 is a subsequence.
Sequence in context: A253971 A291339 A235616 * A091410 A069051 A229290
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Apr 29 2015
EXTENSIONS
More terms from Vincenzo Librandi, Apr 30 2015
STATUS
approved