OFFSET
1,2
COMMENTS
Partial sums of A168156.
EXAMPLE
No prime can be written with only 1 binary digit, thus a(1)=0.
The primes that can be written with 2 binary digits are 2 = 10[2] and 3 = 11[2], they have 3 nonzero bits, so a(2)=3.
Primes with 3 binary digits are 5 = 101[2] and 7 = 111[3]. They add 5 more nonzero bits to yield a(3) = a(2)+5 = 8.
PROG
(PARI) s=0; L=p=2; while( L*=2, print1(s", "); until( L<p=nextprime(p+1), s+=norml2(binary(p))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 20 2009
EXTENSIONS
a(25)-a(32) from Donovan Johnson, Jul 28 2010
a(33) from Chai Wah Wu, Apr 06 2020
a(34) from Chai Wah Wu, Apr 07 2020
STATUS
approved