MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are the necessary conditions for two of the terms in the Pythagorean triplet $a^2 = b^2 + c^2$ to be prime numbers?

share|cite|improve this question
up vote 19 down vote accepted

There is a well-known parametrization of Phythagorean triples as $k(m^2 - n^2)$, $2kmn$ , $k(m^2 + n^2)$ with positive integers $k,m,n$ and $m$ greater $n$.

Now, if two are prime we get $k=1$. And also the middle term is never prime. So the question is when are $m^2 - n^2$ and $m^2 + n^2$ both prime. The former factors as $(m-n) (m+n)$. For this to be prime we need $m-n = 1$.

So we get two of three are prime if and only if $2n+1$ and $2n^2 + 2n + 1$ are prime for some positive integer $n$.

share|cite|improve this answer
...which, in turn, probably happens infinitely often, but this is unknown. – Cam McLeman Oct 5 '11 at 15:41
@Cam: thank for adding this information. A very general conjecture from which this would follow is Schinzel's Hypothesis H's_hypothesis_H – user9072 Oct 5 '11 at 15:46
Also, letting $p=2n+1$ we find that $2n^2+2n+1=\frac{p^2+1}{2}$. So you're basically looking for odd primes $p$ such that $\frac{p^2+1}{2}$ is also prime. – Faisal Oct 5 '11 at 15:52
See – Barry Cipra Oct 5 '11 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.