Proof that there exists infinity positive integers triple $x^2+y^2=z^2$ that $x,y$ are consecutive integers, then exhibit five of them.
This is a question in my number theory textbook, the given hint is that
"If $x,x+1,z$ is a Pythagorean triple, then so does the triple $3x+2z+1,3x+2z+2, 4x+3z+2$"
I wondered how someone come up with this idea.
My solution is letting $x=2st, y=s^2-t^2, z=s^2+t^2$ by $s>t, \gcd(s,t)=1$.then consider two cases: $y=x+1$ and $y=x-1$
Case 1: $y=x+1$
Gives me $(s-t)^2-2t^2=1$ then I found this is the form of Pell's equation, I then found $$\begin{align}s&=5,29,169,985,5741\\t&=2,12,20,408,2378\end{align}$$then yields five triples $$(20,21,29),(696,697,985),(23660,23661,33461),(803760,803761,1136689),(27304196,27304197,38613965)$$ Case 2:$y=x-1$
Using the same method, I come up with Pell's equation $(s+t)^2-2s^2=1$, after solve that I also get five triples: $$(4,3,5),(120,119,169),(4060,4059,5741),(137904,137903,195025),(4684660,4684659,6625109)$$
I have wondered why the gaps between my solution are quite big, with my curiosity, I start using question's hint and exhibit ten of the triples:$$(3,4,5),(20,21,29),(119,120,169),(696,697,985),(4059,4060,5741),(23660,23661,33461),(137903,137904,195025),(803760,803761,1136689),(4684659,4684660,6625109),(27304196,27304197,38613965)$$ These are actually the same as using solutions alternatively from both cases. But I don't know is this true after these ten triples
Basically the problem was solved, but I would glad to see if someone provide me a procedure to come up with the statement
"If $x,x+1,z$ is a Pythagorean triple, then so does the triple $3x+2z+1,3x+2z+2, 4x+3z+2$", and prove that there are no missing triplet between it.
--After edit--
Thanks to @Dr Peter McGowan !, by the matrix
$$
\begin{bmatrix}
1 & 2 & 2 \\
2 & 1 & 2\\
2 & 2 & 3
\end{bmatrix}
\begin{bmatrix}
x\\x+1\\z
\end{bmatrix}
=
\begin{bmatrix}
3x+2z+2\\3x+2z+1\\4x+3z+2
\end{bmatrix}$$ gives me the hinted statement.
You are on the right track. The simplest solution is to recall that all irreducible Pythagorean triples for a rooted ternary tree beginning with $(3, 4, 5) $ triangle. B Berggren discovered that all others can be derived from this most primitive triple. F J M Barning set these out as three matrices that when pre-multiplied by a "vector" of a Pythagorean triple produces another. For the case of consecutive legs we have, starting with $(x_1, y_1, z_1) $, we may calculate the next triple as follows:
$$\begin {align} x_2&=x_1+2y_1+2z_1 \\ y_2&=2x_1+y_1+2z_1 \\ z_2&=2x_1+2y_1+3z_1 \end {align} $$
The hint you were given is a variation on the above more general formula specific for consecutive leg lengths. It is an easy proof by induction to show that the formulas are correct. The first few are:
$(3, 4, 5); (20, 21, 29); (119, 120, 169); (696, 697, 985); (4059, 4060, 5741); (23660, 23661, 33461)$; etc. Obviously, this can be continued indefinitely.
The sequence rises geometrically. A simple explicit formula is available for these solutions that are (as you have already guessed) alternating solutions to Pell's equation.