OFFSET
1,4
LINKS
EXAMPLE
From Michael De Vlieger, Feb 27 2017: (Start)
a(2) = 1 since between 2^2 and 2^3 only the prime 5 (binary 11) has an even number of 1s.
a(3) = 0 since none of the primes between 2^3 and 2^4 have an even number of 1s in their binary expansions.
a(4) = 3 since the primes 17, 23, and 29 have an even number of 1s in their binary expansions (i.e., 10001, 10111, 11101). (End)
MATHEMATICA
Table[m = Count[Prime@ Range[PrimePi[2^n] + 1, PrimePi[2^(n + 1) - 1]], k_ /; EvenQ@ DigitCount[k, 2, 1]]; Print@ m; m, {n, 24}] (* Michael De Vlieger, Feb 27 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen and Labos Elemer, Jun 01 2004
EXTENSIONS
a(34)-a(38) from Amiram Eldar, Jun 20 2024
STATUS
approved