login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A189024
Number of primes in the range (n - sqrt(n), n].
4
0, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 2, 3, 3, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 3, 3, 4, 3, 4, 4, 4, 3, 4, 3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 1, 0, 0, 1
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.
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 03:31 EDT 2024. Contains 376079 sequences. (Running on oeis4.)