OFFSET
2,2
COMMENTS
From Table 1, p. 2, of Kak.
LINKS
Subhash Kak, Prime Reciprocal Digit Frequencies and the Euler Zeta Function, arXiv:0903.3904 [math.GM], 2009.
EXAMPLE
The number of 0's and 1's for all primes with respect to different binary lengths from 2 to 27 is given in Table 1. Thus for all primes of binary length 3, we have the primes 2, 3, 5, and 7 which in the binary form are 010, 011, 101, and 111, with four 0's and 8 1's, so a(2) = 4. Likewise, for all primes of bit length 4, we count the primes 2, 3, 5, 7, 11, and 13 corresponding to the sequences 0010, 0011, 0101, 0111, 1011, 1101, which gives us ten 0's and 14 1's, so a(3) = 10.
PROG
(PARI) an=0; c=0;
f(n)={i=2^(n-1); j=2^n - 1; z=0; for(k=i, j, if(isprime(k), c++; v=binary(k); L=#v; for(m=1, L, if(v[m]==0, z++)))); return(z)};
an=f(2); print1(an, ", "); for(n=3, 28, an=an+c+f(n); print1(an, ", ")) \\ Washington Bomfim, Jan 19 2011
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Jonathan Vos Post, Mar 24 2009
EXTENSIONS
a(28) from Washington Bomfim, Jan 19 2011
STATUS
approved
