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.

A056896 Smallest prime which can be written as k^2 + n for k >= 0.

Original entry on oeis.org

2, 2, 3, 5, 5, 7, 7, 17, 13, 11, 11, 13, 13, 23, 19, 17, 17, 19, 19, 29, 37, 23, 23, 73, 29, 107, 31, 29, 29, 31, 31, 41, 37, 43, 71, 37, 37, 47, 43, 41, 41, 43, 43, 53, 61, 47, 47, 73, 53, 59, 67, 53, 53, 79, 59, 137, 61, 59, 59, 61, 61, 71, 67, 73, 101, 67, 67, 149, 73, 71
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(8)=17 because 17=3^2+8.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 0; While[p = n + k^2; ! PrimeQ[p], k++]; p, {n, 100}] (* T. D. Noe, Apr 01 2011 *)

Formula

a(n) = A056897(n)+n = A056898(n)^2+n.
For p a prime: a(p)=p (and a(p-1)=p if p<>3).

Extensions

Example corrected by Harvey P. Dale, Apr 01 2011