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.

A216930 Numbers k such that k + 2, k^2 + 2, k^3 + 2, k^4 + 2 and k^5 + 2 are all prime.

Original entry on oeis.org

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
Offset: 1

Views

Author

Michel Lagneau, Sep 20 2012

Keywords

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

Crossrefs

Cf. A245510.
Intersection of A040976, A067201, A067200, A216974, and A216976.

Programs

  • 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 *)
  • 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

Formula

a(n) == 3 (mod 6) for n>1. - Alexandru Petrescu, Dec 24 2022