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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A063053 A063050 A330098 * A304720 A057557 A353364
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 15 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 August 24 15:49 EDT 2024. Contains 375417 sequences. (Running on oeis4.)