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.

A087576 Smallest number k > 1 such that k^n+2 is prime.

Original entry on oeis.org

3, 3, 3, 3, 9, 39, 9, 3, 11, 3, 15, 9, 9, 3, 3, 15, 5, 9, 63, 15, 27, 39, 41, 3, 51, 3, 59, 75, 119, 99, 71, 141, 209, 87, 65, 3, 275, 45, 23, 21, 27, 27, 69, 477, 59, 147, 231, 1605, 9, 291, 65, 15, 75, 57, 9, 225, 119, 273, 855, 33, 77, 513, 3, 219, 75, 51, 489, 369
Offset: 1

Views

Author

Amarnath Murthy, Sep 17 2003

Keywords

Comments

Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 16 2019

Crossrefs

Cf. A095302 (corresponding primes), A095303 (smallest k such that k^n-2 is prime), A095304 (corresponding primes).

Programs

  • Mathematica
    Table[k = 2; While[p = k^n + 2; ! PrimeQ[p], k++]; k, {n, 68}] (* T. D. Noe, Apr 03 2012 *)
  • PARI
    for(n=1,68,forstep(k=3,oo,2,if(isprime(k^n+2),print1(k,", ");break))) \\ Hugo Pfoertner, Oct 30 2018

Extensions

Corrected and extended by Hugo Pfoertner, computed using PFGW, Jun 01 2004
a(49) corrected by T. D. Noe, Apr 03 2012