login
Number of primes in the neighborhood of n^2 with radius ceiling(log(n^2)).
2

%I #7 Jul 14 2015 23:20:28

%S 0,3,2,3,2,1,2,3,2,3,0,2,3,4,3,2,2,0,2,2,2,3,1,3,2,3,2,1,1,1,1,3,3,3,

%T 4,5,3,3,1,3,0,1,1,2,3,2,3,3,2,1,2,3,2,2,2,1,3,4,0,2,2,3,1,3,4,3,3,1,

%U 1,2,1,2,2,4,1,2,2,3,1,1,3,2,1,1,2,1,3,2,2,2,3,2,2,3,1,2,3,2,3,2,2,1,3,0,1

%N Number of primes in the neighborhood of n^2 with radius ceiling(log(n^2)).

%e n=10: a[10]=3 and the 3 primes in interval [95, 105] around 10^2=100 are {97,101,103}.

%t f[n_] := (PrimePi[n^2 + Ceiling[Log[n^2]]] - PrimePi[n^2 - Ceiling[Log[n^2]] - 1]); Table[ f[n], {n, 105}] (* _Robert G. Wilson v_, Jul 14 2004 *)

%Y Cf. A096509-A096523, A096830-A096840.

%K nonn

%O 1,2

%A _Labos Elemer_, Jul 14 2004