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.

Showing 1-1 of 1 results.

A258572 Primes p such that p - 2, p^2 - 2, p^3 - 2, p^4 - 2 and p^5 - 2 are all prime.

Original entry on oeis.org

15331, 3049201, 9260131, 10239529, 10955449, 24303469, 33491569, 42699721, 56341711, 66241561, 87068479, 114254629, 129783571, 143927419, 152065549, 221977909, 235529419, 252769399, 280028449, 284535481, 299116021, 312896359, 349665889, 361039519, 407462929
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 03 2015

Keywords

Comments

Intersection of A006512, A062326, A178251, A154832 and A154834.
Subsequence of primes of A216945. - Michel Marcus, Jul 07 2015

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(40000000) | IsPrime(p^1-2) and IsPrime(p^2-2) and IsPrime(p^3-2) and IsPrime(p^4-2) and IsPrime(p^5-2)];
    
  • Mathematica
    Select[Prime[Range[10^8]], And@@PrimeQ[{#, # - 2, #^2 - 2, #^3 - 2, #^4 - 2, #^5 - 2}] &] (* Vincenzo Librandi, Jul 06 2015 *)
    Select[Prime[Range[2172*10^4]],AllTrue[#^Range[5]-2,PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 02 2018 *)
  • PARI
    first(m)=my(v=vector(m),i,p,t=1);for(i=1,m,while(1,p=prime(t);if(isprime(p-2)&&isprime(p^2 - 2)&&isprime(p^3 - 2)&&isprime(p^4 - 2)&&isprime(p^5 - 2),v[i]=p;break,t++));t++);v; /* Anders Hellström, Jul 17 2015 */

Extensions

a(10) corrected and a(14)-a(25) added by Giovanni Resta, Jun 05 2015
Showing 1-1 of 1 results.