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!)
A216930 Numbers k such that k + 2, k^2 + 2, k^3 + 2, k^4 + 2 and k^5 + 2 are all prime. 1
1, 909, 11925, 358875, 959595, 1047585, 3673089, 3925635, 3973971, 4995825, 5519241, 6516015, 6832245, 7217805, 7422381, 9145809, 10929765, 11038071, 11477235, 11721291, 12015555, 12262791, 12280935, 13454349, 13508475, 14625849, 15320829, 15321489, 15332745 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
k^6 + 2 is also prime for k = 4995825, 11038071, ...
a(2) = 909 = A245510(6); a(10) = 4996825, the first k such that k^6 + 2 is also prime, is A245510(7). - Jon E. Schoenfield, Dec 24 2022
LINKS
FORMULA
a(n) == 3 (mod 6) for n>1. - Alexandru Petrescu, Dec 24 2022
MATHEMATICA
Select[Range[16000000], And@@PrimeQ/@(Table[n^i+2, {i, 1, 5}]/.n->#)&]
Select[Range[16*10^6], AllTrue[2 + #^Range[5], PrimeQ] &] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jun 24 2015 *)
PROG
(Python)
from sympy import isprime
def ok(n): return all(isprime(n**i+2) for i in range(1, 6))
print([k for k in range(1, 2*10**7, 2) if ok(k)]) # Michael S. Branicky, Dec 24 2022
CROSSREFS
Cf. A245510.
Intersection of A040976, A067201, A067200, A216974, and A216976.
Sequence in context: A317702 A214001 A252136 * A332190 A015278 A352441
KEYWORD
nonn
AUTHOR
Michel Lagneau, Sep 20 2012
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 05:49 EDT 2024. Contains 371964 sequences. (Running on oeis4.)