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!)
A217721 Number of primes between n^2 - log_2(n)^2 and n^2 (inclusive). 1
0, 1, 1, 1, 1, 1, 2, 2, 3, 2, 1, 2, 3, 2, 2, 2, 3, 4, 4, 3, 3, 2, 3, 4, 4, 3, 3, 3, 5, 4, 4, 4, 2, 2, 4, 5, 2, 5, 2, 3, 4, 4, 3, 4, 5, 5, 3, 5, 7, 2, 3, 6, 6, 4, 5, 3, 3, 5, 6, 4, 5, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 5, 4, 4, 2, 4, 4, 5, 5, 6, 5, 6, 5, 4, 6, 2, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
Conjecture: a(n) > 0 for n > 1.
Conjecture checked up to n = 2^28 - 1.
LINKS
MATHEMATICA
Table[Length[Select[Range[n^2, n^2 - Log[2, n]^2, -1], PrimeQ]], {n, 100}] (* T. D. Noe, Mar 21 2013 *)
PROG
(Python)
import math
def isprime(k):
s = 3
while s*s <= k:
if k%s==0: return 0
s+=2
return 1
for n in range(1, 333):
c = 0
top = n*n
for i in range(top - int(math.log(n, 2)**2), top):
if i&1: c += isprime(i)
print str(c)+', ',
CROSSREFS
Sequence in context: A100890 A262815 A076494 * A071862 A030362 A007906
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 21 2013
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 April 16 19:48 EDT 2024. Contains 371754 sequences. (Running on oeis4.)