# Are primes (ignoring $2$) equally likely to be $1~\text{or}~3\pmod 4$?

For all primes $$p\neq 2$$, it's easy to see that $$p\equiv 1~\text{or}~3\pmod 4$$ I was wondering if it's equally likely ($$50\%-50\%$$) that prime modulo $$4$$ is $$1$$ or $$3$$. And if so, is there a simple proof?

• This may be relevant to your interests: en.wikipedia.org/wiki/Chebyshev%27s_bias Note that the bias notwithstanding, the long-term proportion is $1/2$, $1/2$. Jul 24, 2019 at 0:53
• See Prime Number Theorem. The linked paragraph states that, yes, primes congruent to $1$ or $3$ are equally likely - when interpreted correctly. (Actually, the linked paragraph claims much more). Jul 24, 2019 at 0:54
• Technically, there is no way to get a probability of this sort. But there is a way that this is basically true. Jul 24, 2019 at 0:56
• article by Granville: arxiv.org/abs/math/0408319 There is a @GregMartin on this site, possibly the other author? Jul 24, 2019 at 0:56
• Thank you very much! So to summarize, they occur with equal probability, but being 3 mod 4 occurs more for the most part (but not by an overly large amount). More concretely, if $a$ and $b$ are the number of primes less than $N$ that are 1 mod 4 and 3 mod 4 respectively, then $lim_{N\to \infty} \frac{a}{b} = 1$, but it's usually the case that $\frac{a}{b}<1$. These are due to the prime number theorem for arithmetic progressions and chebyshev's bias respectively. Jul 24, 2019 at 1:09

There are infinitely many primes of forms $$4n + 1$$ and $$4n +3$$.

However, it is not clear which of the two are more abundant.

In 1853, Chebyshev in a letter indicated that he had a proof that the number of primes of the form $$4n+1$$ is less than the number of primes of the form $$4k+3$$. However, in 1914, Littlewood showed that Chebychev's assertion fails infinitely often; however, he did not specify where this first reversal occurs.

Nevertheless, some forty years later in a computer search, it was discovered that the first prime for which the $$4n+1$$ primes become more plentiful than the $$4n+3$$ primes is for the prime $$26861$$.

That situation is not reversed until the prime $$616,841$$.

Although every prime is either of one of these two types infinitely often, and despite Littlewood's proof, the density of each of these two prime types as far as I know has not been established. That being the case, it remains an open question that given a prime $$p$$, it is more likely to be of one type than another.

• The density of each is asymptotically 1/2 of all primes. This is Dirichlet's theorem on arithmetic progressions. Jul 24, 2019 at 2:26
• According to Wiki (Pythagorean primes)---More strongly, for each n, the numbers of Pythagorean and non-Pythagorean primes up to n are approximately equal.'' (However, they do not cite a reliable reference nor do they quantify what is meant by approximately equal.) Do you have a reliable reference on your assertion of asymptotically equal? I indeed would like to obtain it. Thank you. Jul 24, 2019 at 2:33
• This is what is known as Dirichlet's theorem on arithmetic progressions; here are some notes on it and here's another. Jul 24, 2019 at 2:44

Summarizing the comments: They occur with equal probability, but being 3 mod 4 occurs more for the most part (but not by an overly large amount). More concretely, if $$a$$ and $$b$$ are the number of primes less than $$N$$ that are 1 mod 4 and 3 mod 4 resp., then $$\lim_{N\to\infty}\frac{a}{b}=1$$, but it's usually the case that $$\frac{a}{b}<1$$. These are due to the prime number theorem for arithmetic progressions and Chebyshev's bias respectively.