# Are there infinitely many Pythagorean triples with two primes?

Using the classic parametrization of Pythagorean triples, for a primitive triple to contain two primes, we need

$$a = |m^2 - n^2|, c = m^2 + n^2$$

to be prime. Taking $$m WLOG, this means $$a = 2m + 1, c = 2(m)(m+1) + 1$$ are both prime. There are many examples of this with small $$m$$:

$$m = 1, 2m+1 = 3, 2(m)(m+1) + 1 = 5$$

$$m = 2, 2m+1 = 5, 2(m)(m+1) + 1 = 13$$

$$m = 5, 2m+1 = 11, 2(m)(m+1) + 1 = 61$$

$$m = 9, 2m+1 = 19, 2(m)(m+1) + 1 = 181$$

but these occurrences get sparser as $$m$$ increases. Are there infinitely many such triples?

• Not known, but it would follow from some standard conjectures. See, e.g. this
– lulu
Commented Sep 15, 2023 at 17:36
• Right, you need $\frac{(2m+1)^2+1}2$ to be prime. There is no polynomial of one variable of degree $>1$ that is known to be prime infinitely often. But we also haven't proven many such polynomials are not prime infinitely often, either, except when they have obvious factors. In other words, it seems unlikely you'll get a complete answer here. Commented Sep 15, 2023 at 17:42
• Clearly, only primitive Pythagorean triples can have 2 primes. Every primitive Pythagorean triple has two odd values and one even value. Every Pythagorean triple has one side that's a multiple of 5. There are a few triples like 20,21,29 and 11,60,61 where the even factor is the multiple of 5. That may be a good place to start. Commented Sep 15, 2023 at 19:49
• I'm surprised every Pythagorean triple includes a multiple of 5! But it works out. Choosing $m,n > 0$ we have $(m^2-n^2, 2mn, m^2+n^2)$ are a triple. If either $m,n$ are divisible by 5 then $2mn$ is divisible by 5, so assume neither are. Then either $m^2=n^2 \pmod{5}$ or one of $m^2,n^2$ is 1, and the other is 4, so $m^2-n^2 = 0 \pmod{5}$, since the only non-zero quadratic residues mod 5 are 1 and 4. Neat fact, I didn't know that! Commented Oct 18, 2023 at 1:19

COMMENT. - We have $$m^2+n^2=p$$ and $$m^2-n^2=q$$. Since $$m^2-n^2=(m-n)(m+n)$$ the only possibilities are those for which $$m=n+1$$ so the candidate prime $$q$$ should belong to the infinite set of odd primes $$q=2n+1$$.

Choosing $$q$$ we need that $$m^2+n^2=2n^2+2n+1$$ be a prime $$p$$.

Supposing there is only a finite number of primes such that $$p^2+(2x)^2=q^2$$ and let $$Q$$ be the greatest prime of them. There are infinitely many primes $$q=2n+1$$ greater than $$Q$$ and we want to prove that for $$n$$ chosen among these, the number $$n^2+(n+1)^2=2n^2+2n+1$$ can be also a prime.

Note that the polynomial $$f(x)=2x^2+2x+1$$ is irreducible over $$\mathbb Q$$ and not constantly multiple of a fixed number (not as $$g(x)=x^3+x+4$$ which is irreducible and always $$g(n)$$ is even). Consequently, according a conjecture of Bunyakovsky, generalizing Dirichlet's theorem of the arithmetic progression, we must have that $$f(n)$$ is a prime for infinitely many integers $$n$$. As far as we know some progress has been made for the conjecture on the quadratic polynomials.

Let $$A$$ the set of primes $$p=2n+1$$ greater than $$Q$$ and $$B$$ the (infinite) set of primes $$f(k)$$ assumed by Bunyakovsky for the polynomial $$f(x)=2x^2+2x+1$$. By our assumption of absurd, we have $$A\cap B=\emptyset$$ This is not an answer but a comment for which we give a viewpoint contrary to the suggested by the O.P. We feel that there are an infinity of Pythagorean triples as required while the O.P. feels the contrary.

• I also believe there are infinitely many - I cannot prove it, however :-) Commented Oct 18, 2023 at 1:12
• @Dave Neary. I apologize for misunderstanding of your belief. My English is quite deficient. Regards. Commented Oct 19, 2023 at 2:23

This formula $$\quad A=2k+1,\quad B=2k^2+2k,\quad C=2k^2+2k+1\quad$$ generates the subset of primitive triples where $$\,C-B=1,\,$$ and only this subset can and does contain triples with dual primes.

By inspection we can see that side-$$A\,$$ includes all odd prime numbers.

By inspection, we can see taht side-$$C\,$$ is of the form $$\,4x+1\,$$ and this includes an infinite subset of an infinite number of odd primes.

When two infinite sets can be shown to correlate at points, we can infer there are infinitely many such points unless reason can be shown why this is not true. Here is a finite sample of these points where Pythagorean triples have dual primes.

$$\begin{equation*}(3,4,5)\quad(5,12,13)\quad(11,60,61)\quad(19,180,181) \quad(29,420,421)\\ (79,3120,3121\quad(101,5100,5101)\quad (131,8580,8581)\quad(139,9660,9661) \\ (181,16380,16381)\quad(199,19800,19801) \quad(271,36720,36721) \end{equation*}$$