cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A270972 Primes p such that p-2, p^2-2 and p^3-2 are all prime.

Original entry on oeis.org

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

Views

Author

Emre APARI, Mar 27 2016

Keywords

Comments

Subsequence of A006512. - Altug Alkan, Mar 27 2016

Examples

			p=19; p-2 = 17 (is prime), p^2-2 = 359 (is prime), p^3-2 = 6857 (is prime).
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500000) | IsPrime(p-2) and IsPrime(p^2-2) and IsPrime(p^3-2)]; // Vincenzo Librandi, Mar 28 2016
  • Mathematica
    Select[Prime@ Range@ 42000, Function[k, AllTrue[k^# & /@ Range@ 3 - 2, PrimeQ]]] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
  • 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
    

Extensions

More terms from Altug Alkan, Mar 27 2016