login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258572 Primes p such that p - 2, p^2 - 2, p^3 - 2, p^4 - 2 and p^5 - 2 are all prime. 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Intersection of A006512, A062326, A178251, A154832 and A154834.
Subsequence of primes of A216945. - Michel Marcus, Jul 07 2015
LINKS
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 *)
PROG
(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)];
(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 */
CROSSREFS
Sequence in context: A064982 A204317 A216945 * A352477 A232382 A175751
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(10) corrected and a(14)-a(25) added by Giovanni Resta, Jun 05 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:45 EDT 2024. Contains 371975 sequences. (Running on oeis4.)