OFFSET

1,1

COMMENTS

As the squares of the successive odd numbers are those numbers appearing on the SE spoke of the Ulam spiral, a(n) also gives the number of primes appearing in the n-th square ring around 1 of the Ulam spiral. - Scott R. Shannon, Jan 14 2020

LINKS

Didier van der Straten, Jon Perry, Mark Underwood, TR: [PrimeNumbers] pi(x), digest of 3 messages in primeforms Yahoo group, Aug 29 - Aug 30, 2003. [Cached copy]

Mark Underwood, [PrimeNumbers] pi(x).

Wikipedia, Ulam Spiral.

MATHEMATICA

Table[PrimePi[(2n + 1)^2] - PrimePi[(2n - 1)^2], {n, 1, 72}]

PROG

(PARI) forstep (k=1, 130, 2, print1(primepi((k+2)^2)-primepi(k^2), ", ")) \\ Hugo Pfoertner, Nov 15 2019

(Magma) [#[p:p in PrimesInInterval(k^2, (k+2)^2)]:k in [1..150 by 2]]; // Marius A. Burtea, Jan 14 2020

CROSSREFS

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Dec 06 2003

STATUS

approved