Skip to main content
1 of 2

Parities of binary weights of primes

Let $X$ denote the sequence 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}$ (if this value converges)?