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.

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)).

This page as a plain text file.
%I A096840 #12 Nov 27 2017 00:44:10
%S A096840 1,6,3,2,14,36,117,1652,9582,41361,908637,36284185
%N 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)).
%e A096840 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}.
%t A096840 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 *)
%Y A096840 Cf. A096509-A096523, A096830-A096839.
%K A096840 more,nonn
%O A096840 0,2
%A A096840 _Labos Elemer_, Jul 14 2004
%E A096840 Offset corrected and a(11) from _Donovan Johnson_, Jul 11 2010