# Pythagorean triples, proof clarification

Question

Prove for every odd integer $$a \geq 3$$ that there exists an even integer $$b$$ such that $$(a, b, b + 1)$$ is a Pythagorean triple.

Proof

Let $$a \geq 3$$ be an odd integer. Then $$a = 2n + 1$$ for some positive integer $$n$$. We seek a positive even integer $$b$$ such that $$(a, b, b + 1)$$ is a Pythagorean triple. Then

$$a^2 + b^2 = 4n^2 + 4n + 1 + b^2 = b^2 + 2b + 1.$$

Therefore, $$2b = 4n^2+4n$$ and so $$b = 2n^2+2n.$$ Letting $$b = 2n^2+2n$$ , we see that $$a^2+b^2 = (b+1)^2$$ and so $$(a, b, b + 1)$$ is a Pythagorean triple.

My question is how we could we write $$4n^2 + 4n + 1 + b^2 = b^2 + 2b + 1$$ before we say that $$2b = 4n^2+4n$$? The way it was written makes it seem like $$4n^2 + 4n$$ naturally simplifies to $$2b$$, but I don't see how it does before $$2b$$ is explicitly defined to equal $$4n^2 + 4n$$.

• The LHS is the expansion of $a^2 + b^2$, substituting $a = 2n + 1$. The RHS is the expansion of $(b+1)^2$. All you've done is simplify $a^2 + b^2 = (b+1)^2$ with the required assumptions (substitutions). Then when you simplify, the necessary condition that pops out is $2b = 4n^2 + 4n$
– Sam
Commented Nov 10, 2022 at 21:28
• @SameerAbbas Thank you! Commented Nov 10, 2022 at 21:47

This is actually a pretty common technique of proof. We're essentially working backwards from the conclusion: if there was a $$b$$ satisfying $$a^2+b^2=(b+1)^2$$, then necessarily we would have $$4n^2+4n+1+b^2=b^2+2b+1$$ by expanding the two expressions. The $$b^2$$ terms cancel and we would find that $$4n^2+4n=2b$$ and therefore $$2n^2+2n=b$$. To prove your claim, we need to supply the correct number $$b$$, but this calculation shows us that there is only one possibility, namely take $$b=2n^2+2n$$.

• Thanks! Should have seen it, would take literally a second to expand (b+1)^2 in my head, but just gave up and jumped to an answer without even reading the question properly. Commented Nov 10, 2022 at 21:51

That proof is showing you the author's reasoning - how they discovered that choosing $$b = 2n^2 + 2n$$ would do the job.

They could have written the proof as a straightforward implication starting with that definition of $$b$$. But without the preliminary analysis you could follow the algebra but reasonably ask "where did that come from"?

The problem is with the word "then" just before your long equality, and the text after. It should be replaced with something like this:

If such an integer $$b$$ exists, then $$a, b,$$ and $$b+1$$ must satisfy the following equality.

$$equation here$$

which is equivalent to $$2b = 4n^2 + 4n$$. Picking $$b = 2n^2 + 2n$$, we see that there is indeed such a number, hence...

NB: seeing Ethan's answer, I realize that you're quoting from someone else's proof that confused you. I thought you were quoting your own proof, which had been marked correct, but then gave you pause as you looked at it.

We begin with Euclid's formula which is probably the most accepted one for generating Pythagorean triples. $$A=m^2-k^2 \qquad B=2mk \qquad C=m^2+k^2$$ If we replace $$\,m\,$$ with $$\,(2n-1+k),\,$$ we get $$A=(2n-1+k)^2-k^2 \quad B=2(2n-1+k)k \quad C=(2n-1+k)^2+k^2$$ which resolves to \begin{align*} &A=(2n-1)^2+&&2(2n-1)k\\ &B= &&2(2n-1)k+&2k^2\\ &C=(2n-1)^2+&&2(2n-1)k+&2k^2 \end{align*} and generates the subset of triples (below) where $$\,C-B=(2n-1)^2.\quad$$ By inspection of both the formula and the table, we can see that $$\,B\,$$ is always a multiple of $$\,4\,$$ (even) and that $$\,n=1\implies C-B=1.$$

$$\begin{array}{c|c|c|c|c|c|c|} n & k=1 & k=2 & k=3 & k=4 & k=5 \\ \hline Set_1 & 3,4,5 & 5,12,13& 7,24,25& 9,40,41& 11,60,61 \\ \hline Set_2 & 15,8,17 & 21,20,29 &27,36,45 &33,56,65 & 39,80,89 \\ \hline Set_3 & 35,12,37 & 45,28,53 &55,48,73 &65,72,97 & 75,100,125 \\ \hline Set_{4} &63,16,65 &77,36,85 &91,60,109 &105,88,137 &119,120,169 \\ \hline Set_{5} &99,20,101 &117,44,125 &135,72,153 &153,104,185 &171,140,221 \\ \hline \end{array}$$