Distribution of Digits of Binary Expansion of Primes

174 Views Asked by At

In considering the binary expansion of prime numbers, I'm interesting in the skew of digits towards 0 or 1.

I searched through other questions and arrived at: Last digits of primes

I just want to confirm my suspicion that if I exclude the most significant binary digit and the 3 least significant binary digits (in avoidance of issues from 2 and 5), and if i consider each binary position independently, the distribution across primes should tend to a 50/50 balance of 0s and 1s?

Should this follow as well for distinct semiprimes?

Anything other impacts (e.g. 3, 7, ...)?

1

There are 1 best solutions below

1
On BEST ANSWER

The last binary digit is, of course, $1$ except for the prime $2$. Every other binary digit, including the second-last and third-last, should be (asymptotically) equally likely to be $0$ or $1$, because of (the strong form of) Dirichlet's theorem on primes in arithmetic progressions: asymptotically, for any fixed $m$, the primes are evenly distributed among the odd congruence classes mod $2^m$.