OFFSET
1,3
COMMENTS
Note that the lower bound, n-sqrt(n), is excluded from the count and the upper range, n, is included. The last zero term appears to be a(126). See A189026 for special primes associated with this sequence. This sequence is related to Oppermann's conjecture that for any k > 1 there is a prime between k^2 - k and k^2.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Wikipedia, Oppermann's conjecture
MATHEMATICA
cnt = 0; lastLower = 0; Table[lower = Floor[n - Sqrt[n]]; If[lastLower < lower && PrimeQ[lower], cnt--]; lastLower = lower; If[PrimeQ[n], cnt++]; cnt, {n, 100}]
Table[PrimePi[n]-PrimePi[n-Sqrt[n]], {n, 130}] (* Harvey P. Dale, Mar 26 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 15 2011
STATUS
approved