OFFSET
0,3
EXAMPLE
a(0)=0 because [2^0-0^2, 2^0]=[1, 1],
a(1)=1 because 2 in range [2^1-1^2, 2^1]=[1, 2],
a(2)=2 because 2, 3 in range [2^2-2^2, 2^2]=[0, 4],
a(3)=4 because 2, 3, 5, 7 in range [2^3-3^2, 2^3]=[-1, 8],
a(4)=6 because 2, 3, 5, 7, 11, 13 in range [2^4-4^2, 2^4]=[0, 16],
a(5)=8 because 7, 11, 13, 17, 19, 23, 29, 31 in range [2^5-5^2, 2^5]=[7, 32].
MAPLE
A192515 := proc(n) a := 0 ; for i from 2^n-n^2 to 2^n do if isprime(i) then a := a+1 ; end if; end do; a ; end proc: # R. J. Mathar, Jul 11 2011
MATHEMATICA
Table[Count[Range[2^n - n^2, 2^n], p_ /; PrimeQ@ p], {n, 0, 65}] (* Michael De Vlieger, Apr 03 2016 *)
PROG
(PARI) a(n) = primepi(2^n) - primepi(2^n-n^2) + isprime(2^n-n^2); \\ Michel Marcus, Apr 03 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 03 2011
EXTENSIONS
Corrected and extended by R. J. Mathar, Jul 11 2011
STATUS
approved