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”).

A270972
Primes p such that p-2, p^2-2 and p^3-2 are all prime.
0
19, 8629, 9721, 12109, 13831, 15331, 17029, 17989, 25849, 33151, 56209, 70999, 73039, 78541, 92461, 97369, 97609, 103069, 103969, 147139, 174469, 179719, 203341, 217369, 221401, 242059, 249541, 269431, 277549, 283009, 285559, 324619, 333451, 346669, 393079, 404269, 409261, 424891, 440551, 488689
OFFSET
1,1
COMMENTS
Subsequence of A006512. - Altug Alkan, Mar 27 2016
EXAMPLE
p=19; p-2 = 17 (is prime), p^2-2 = 359 (is prime), p^3-2 = 6857 (is prime).
MATHEMATICA
Select[Prime@ Range@ 42000, Function[k, AllTrue[k^# & /@ Range@ 3 - 2, PrimeQ]]] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
PROG
(PARI) lista(nn) = {forprime(p=5, nn, if(isprime(p-2) && isprime(p^2-2) && isprime(p^3-2), print1(p, ", "))); } \\ Altug Alkan, Mar 27 2016
(Magma) [p: p in PrimesUpTo(500000) | IsPrime(p-2) and IsPrime(p^2-2) and IsPrime(p^3-2)]; // Vincenzo Librandi, Mar 28 2016
KEYWORD
nonn
AUTHOR
Emre APARI, Mar 27 2016
EXTENSIONS
More terms from Altug Alkan, Mar 27 2016
STATUS
approved