Let $X$ denote the sequence [A200246](https://oeis.org/A200246): an $i$-th element of $X$ is equal to $w(p\_i) \bmod 2$, where $w(p\_i)$ is the number of ones in the base-$2$ representation of an $i$-th prime.


The first $564163$ bits of $X$ (corresponding to all primes less than $2^{23}$) contain $274615$ zeros and $289548$ ones.


The first $1077871$ bits of $X$ (corresponding to all primes less than $2^{24}$) contain $520574$ zeros and $557297$ ones.


It seems that the prevalence of ones is too visible to be ignored. How to explain this? What is the value of $$\lim\_{n \to \infty} \frac{f\_0(n)}{f\_1(n)},$$ where $f\_b(n)$ denotes the number of elements with value $b$ in the initial bits of $X$ corresponding to all primes less than $2^{n}$ for a positive integer $n > 1$ (if this value converges)?



Parities of binary weights of primes
[Mauduit and Rivat](https://annals.math.princeton.edu/2010/171-3/p04) showed that the sum of the binary digits of primes are equally distributed between the possibilities $0\bmod 2$ and $1\bmod 2$. So the limit you want is $1$. More generally they consider the distribution $\bmod q$ of the sums of digits of primes written in any base $b$.


