I'm almost done proving that for any odd numbers $s, t : s > t \geq 1, \ \ \gcd(s, t) = 1$, one can generate PPTs (Primitive Pythagorean Triples) with the formula $$\displaystyle (a, b, c) = \left(st, \frac{s^2-t^2}{2}, \frac{s^2+t^2}{2}\right)$$

However, the only piece I'm missing, is to show that these three expressions, given the initially stated conditions on $s$ and $t$, will be coprime.

I.e. I need to show that $\gcd\left(st, \frac{s^2-t^2}{2}, \frac{s^2+t^2}{2}\right) = 0$.

The book hints at using the fact that if a prime divides a product, it divides at least one factor in the product. In other words $p \mid xy \Rightarrow p\mid x \vee p \mid y$. But I haven't been able to piece that together into a proof.

I've tried a proof by contradiction, where using the definition of divisibility, I tried assuming that there exists a prime $p$ that divides both $st$ and $\frac{s^2- t^2}{2}$, and seeing if I could get a blatant contradiction, but I haven't seen any yet. Or at least not noticed.

I'd especially favor any tip/solution that involves my idea of a proof by contradiction, as it will at least validate some of the efforts I've made so far.

But any help would be appreciated, of course!


2 Answers 2


We know $p=2$ cannot divide all the factors because $s$ and $t$ are stipulated to be odd, so $2 \nmid st$.

Let $p$ be an odd prime. Suppose $p|st$. By the fact you mentioned, $p|s$ or $p|t$, and not both because $s$ and $t$ are coprime; let's say $p \mid s$ and $p \nmid t$. Then $p \nmid (s+t)$ and $p \nmid (s-t)$, so $p \nmid (s+t)(s-t) = s^2 - t^2$, and thus $p \nmid \frac{s^2-t^2}{2}$.

  • $\begingroup$ Ah nice, got it. But does this also cover our favorite even prime? I suspect it's trivial, but I'm not seeing it. $\endgroup$
    – Alec
    Jan 10, 2018 at 16:13
  • $\begingroup$ @Alec Nope, because of the division by two. But since you stipulated $s$ and $t$ to be odd, we know $2 \nmid st$ $\endgroup$
    – BallBoy
    Jan 10, 2018 at 16:15
  • $\begingroup$ @Alec I've added this to the answer. $\endgroup$
    – BallBoy
    Jan 10, 2018 at 16:22

You may or may not be able to generate primitive triples with your function because it reads the same as Euclid's formula except with $A$ and $B$ reversed and all the terms divide by $2$. For Euclids $(m,n)=(2,1)$ you would get $(2,1.5,2.5)$ as a triple. Let's try your equation with terms multiplied by $2$ and with $A,B$ reversed.

$\text{We are given }\quad A=m^2n^2\quad B=2mn\quad C=m^2+n^2$

Let $x$ be the GCD of $m,n$ and let $p$ and $q$ be the cofactors of $m$ and $n$ respectively. Then we have

$$A=(xp)^2-(xq)^2\quad B=2xpxq\quad C=(xp)^2+(xq)^2$$ $$A=x^2(p^2-q^2)\quad B=2x^2(pq)\quad C=x^2(p^2+q^2)$$

If $GCD(m,n)=1$, then $GCD(A,B,C)=1$ and $(A,B,C)$ is a primitive triple. This means that $m$ and $n$ must be co-prime to generate a primitive.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .