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.

A087577 Smallest number k such that k^n + 3 is a prime.

Original entry on oeis.org

2, 2, 2, 2, 8, 2, 2, 4, 4, 8, 10, 2, 20, 4, 2, 2, 10, 2, 124, 46, 16, 20, 190, 14, 68, 50, 152, 2, 34, 2, 34, 122, 130, 208, 374, 46, 68, 64, 10, 28, 248, 4, 106, 230, 34, 208, 52, 34, 154, 230, 116, 302, 656, 38, 2, 10, 16, 34, 140, 140, 20, 232, 140, 28, 64, 328, 2, 98, 28, 818
Offset: 1

Views

Author

Amarnath Murthy, Sep 17 2003

Keywords

Examples

			a(5) = 8 as 8^5 + 3= 32771 is prime, while 2^5 +3, 4^5+3 and 6^5 +3 are composite.
		

Crossrefs

Cf. A087576.

Programs

  • Mathematica
    snk[n_]:=Module[{k=1},While[!PrimeQ[k^n+3],k++];k]; Array[snk,70] (* Harvey P. Dale, Mar 08 2014 *)
  • PARI
    for(j=1,50, for (i=1,150,if(isprime(i^j+3),print1(i,",");break())))

Extensions

More terms from Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 14 2004
More terms from David Wasserman, Jun 08 2005