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!)
A192454 Number of primes in the range [2^n-n, 2^n+n]. 3
0, 2, 3, 3, 3, 3, 3, 2, 3, 3, 4, 2, 3, 2, 1, 3, 5, 3, 6, 2, 5, 4, 3, 5, 2, 0, 2, 0, 2, 2, 5, 3, 3, 4, 1, 1, 4, 4, 2, 4, 2, 3, 4, 2, 4, 0, 2, 3, 1, 0, 2, 1, 3, 2, 2, 4, 3, 5, 2, 1, 1, 6, 1, 2, 4, 1, 3, 7, 4, 2, 3, 2, 1, 2, 5, 3, 4, 6, 3, 3, 2, 4, 5, 2, 5, 2, 7, 3, 1, 7, 4, 3, 2, 3, 2, 4, 5, 0, 5, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
a(1) = 2 because two primes in the range [1^2-1, 1^2+1], a(2) = 3 because 2, 3 and 5 are in range [2^2-2, 2^2+2].
MAPLE
with(numtheory); f:=n->pi(2^n+n)-pi(2^n-n-1); [seq(f(n), n=0..20)];
# second Maple program:
a:= n-> add(`if`(isprime(t), 1, 0), t=2^n-n..2^n+n):
seq(a(n), n=0..100); # Alois P. Heinz, Sep 13 2011
MATHEMATICA
Table[PrimePi[2^n + n] - PrimePi[2^n - n - 1], {n, 0, 40}]
CROSSREFS
Sequence in context: A276858 A247656 A294081 * A340944 A270533 A344511
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected with Maple program. - N. J. A. Sloane, Jul 11 2011
Corrected name and added terms up to a(40). - T. D. Noe, Jul 12 2011
More terms from Alois P. Heinz, Sep 13 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 July 17 12:34 EDT 2024. Contains 374377 sequences. (Running on oeis4.)