OFFSET
1,2
LINKS
Lei Zhou, Table of n, a(n) for n = 1..47
FORMULA
a(n) = A036378(n-1), n>2. - R. J. Mathar, Jun 27 2009
EXAMPLE
The consecutive primes 17 (10001 in binary), 19 (10011 in binary), 23 (10111 in binary), 29 (11101 in binary), and 31 (11111 in binary) are the only primes each written with exactly 5 digits in binary. There are 5 of these primes, so a(5) = 5.
MATHEMATICA
Table[PrimePi[2^(d + 1)] - PrimePi[2^d-1], {d, 1, 46}] (*Lei Zhou Dec 17 2013; this is capable of generating terms 1..47 *)
Join[{1, 2}, t=Table[PrimePi[2^n], {n, 2, 40}]; Rest@t - Most@t] (* Vincenzo Librandi, Dec 08 2015 *)
PROG
(Magma) [#PrimesInInterval(2^n, 2^(n+1)): n in [0..25]]; // Vincenzo Librandi, Dec 08 2015
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jun 25 2009
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 25 2010
STATUS
approved