# how to show that the sequence of primes modulo 4 is not eventually periodic?

the question as posed is easily seen to be equivalent to asking how to show that a certain number is irrational.

the number referred to as $\Phi$ is defined briefly beneath the question. it is a characteristic number encoding an infinite sequence of binary bits. in this case the information concerns the parity of the odd primes modulo $4$.

question is there a quick demonstration of the irrationality of $\Phi$?

i have a few other curiosities about the distribution of the binary digits of this number (or of the coefficients of the corresponding 2-adic integer), but the simple number theoretic question is all i wish to ask here.

in fact since the deep properties of the primes seem to be encrypted beyond the polynomial domain, one might judge it very likely that $\Phi$ is transcendental, but the assertion of its irrationality is a much more modest claim.

let $P \subset \mathbb{N}$ be the odd primes, numbered in ascending order so $p_0=3$, $p_1=5$ and so on. define the parity function on primes $\phi \in 2^{\mathbb{N}}$ by $$\phi(n) = \phi_n = \frac12 (1 + i^{p_n-1})$$ this gives rise to the sequence $\Phi_m$ where: $$\Phi_m = \sum_{k=0}^m \frac{\phi_k}{2^k}$$ with $$\Phi = \lim_{m \to \infty} \Phi_m = 1.010110011... = 1.34960...$$

• @mixedmath sorry if my exposition was confusing. Dirichlet's theorem is a beautiful and profound result. i hope one day to really get to grips with the proof, but i need a bit more preparation to develop the required attention span – David Holden Aug 5 '14 at 13:38

It is known by a result of Daniel Shiu that there are arbitrarily long runs of consecutive primes congruent to $1$ modulo $4$. (It also would work for $3$ modulo $4$ or in fact any admissible congruence class.)
There is some discussion of this and other methods to see this in the MO question The prime numbers modulo $k$, are not periodic