Pythagorean Triples : Is every positive integer $\gt$ $2$ part of at least one Pythagorean triple?

I was doing some basic number theory problems from Rosen and came across this problem:

Show that every positive integer $\gt$ $2$ is part of at least one Pythagorean triple

My Solution (partial) :

Case - 1 :

• Let there be an integer $t$ $\ge$ 3
• Suppose $t$ is of the form $2^{j}$ for $j > 1$
• Let $m$ = $2^{j-1}$ and $n$ = $1$
• So , $2mn$ = $t$ and hence $t$ belongs to a Pythagorean triple

Case - 2 :

• Let $t$ = $2n + 1$
• WLOG , let $m = n + 1$
• Then $m$ and $n$ have opposite parity
• Also , $m > n$
• So , $m^{2}$ - $n^{2}$ $=$ $2n + 1$ $=$ $t$, so $t$ belongs to a Pythagorean triple

My Problem:

Can someone help me out ? I do not know if I am correct , I am all thumbs ; even a hint would suffice ...

• THe first case should deal with $2t$, not $2^t$ – Asvin Apr 21 '15 at 9:33
• You haven't checked the case when $t$ is even and not a power of $2$. Also your proof of case 2 uses redundant steps "then $m,n$ have opposite parity" and "$m>n$". – user26486 Apr 21 '15 at 11:21
• Thanks @Asvin , I got it :) – pranav Apr 21 '15 at 11:58

Using the characterisation of these triples, it suffices to show that any such number can be written as $m^2-n^2$, $2mn$ or $m^2+n^2$ with some numbers $m>n$.

The case $m^2-n^2$ covers "the most" numbers (only those $\equiv 2 \mod 4$ remain), the rest is covered by $2mn$.

• Hi @MooS , could you please explain the last line of your answer in a bit detail ... would be very grateful :) – pranav Apr 21 '15 at 9:21
• You should show that every odd number can be written as $m^2-n^2$. Any even number $2d$ greater than $2$ can be written as $2d=2 \cdot d \cdot 1$, hence is of the form $2mn$. – MooS Apr 21 '15 at 9:22
• Hi @MooS , I have tried something out and have accordingly edited the question , please have a look and tell me if I am correct or not ... would be grateful ... :) – pranav Apr 21 '15 at 9:29
• Note that $(m^2-n^2,2mn,m^2+n^2)$ only gives the primitive triples. For example it does not give the triple $(3,0,3)$. – punctured dusk Apr 25 '15 at 7:37
• This is not relevant in this context. Note that those triples are only primitive if $m$ and $n$ are co-prime. Furthermore i do not think triples (n,0,n) were valid in this exercise, since that would make everything trivial. – MooS Apr 25 '15 at 7:46

I. Yes. Proof without words:

$$(\color{brown}{2m})^2+(m^2-1)^2 = (m^2+1)^2$$

$$(\color{brown}{2m+1})^2+(2m^2+2m)^2 = (2m^2+2m+1)^2$$

II. Higher.

To prove it for quadruples is easier since even and odd cases can be combined into a single identity,

$$n^2+(n+1)^2+(n^2+n)^2 = (n^2+n+1)^2$$

and for quintuples,

$$n^2 + (n-2)^2 + (2n+1)^2 + (3n^2+2)^2 = (3n^2+3)^2$$

If $n$ is an odd integer, let $m = \frac{n^2 - 1}2$, then $m+1$, $m$ and $n$ are a Pythagorean triple. ($n^2 = 2m+1$)

If $n$ is even, let $m = \frac{n^2 - 4}4$, then $m+2$, $m$, and $n$ are a Pythagorean triple. $(n^2 = 4m+4)$

If $t$ is odd and $t\geq 3$ then $m=(t+1)/2$ and $n=(t-1)/2$ are positive integers with $m^2-n^2=t.$ And $(m^2-n^2,2mn, m^2+n^2)=(t,2mn, m^2+n^2)$ is a P. triple.

If $t$ is even and $t\geq 4$ let $m= t/2$ and $n=1$. Then $m,n$ are positive integers with $m>n$ so $(m^2-n^2,2mn,m^2+n^2)=(m^2-n^2,t,m^2+n^2)$ is a P. triple.

For primitive triples, side $$A$$ can be any odd number $$>2$$ and side $$B$$ can be any integer multiple of $$4$$. If we include multiples like $$(6,8,10)$$, then the even numbers that are not multiples of $$4$$ are include. Therefore, every $$n>2\land n\in\mathbb{N}$$ is part of at least one Pythagorean triple.