login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A096840
a(n) = x is the least number such that around x^2 (the center) the number of primes is equal to n. The radius of neighborhood is ceiling(log(x^2)).
8
1, 6, 3, 2, 14, 36, 117, 1652, 9582, 41361, 908637, 36284185
OFFSET
0,2
EXAMPLE
n=9: a(9) = 41361, center = 1710732321, radius = 22; the nine primes in the zone are {1710732299, 1710732307, 1710732311, 1710732313, 1710732319, 1710732323, 1710732329, 1710732337, 1710732343}.
MATHEMATICA
f[n_] := (PrimePi[n^2 + Ceiling[ Log[n^2]]] - PrimePi[n^2 - Ceiling[ Log[n^2]] - 1]); t = Table[0, {15}]; Do[a = f[n]; If[a < 15 && t[[a + 1]] == 0, t[[a + 1]] = n], {n, 10^5}] (* Robert G. Wilson v, Jul 14 2004 *)
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Labos Elemer, Jul 14 2004
EXTENSIONS
Offset corrected and a(11) from Donovan Johnson, Jul 11 2010
STATUS
approved