Are there n positive integers, such that $z_1^2+z_2^2 +…+z_{n-1} ^2=z_n^2$, for every $n>1$? [duplicate]

For every integer r>=3 there exists a sequence $a_{1,\space }a_{2,}.....,a_r$ of nonzero integers with the property that $a_1^2+a_2^2+....+a_{r-1}^2=a_r^2$ I tried to prove this with proof by induction (as to whether it was false or not) I'm not sure if that was the correct method. any help with solving this would be greatly appreciated


Well, let's see.

$$ 3^2+4^2=5^2 $$

so if there exist

$$ a_1^2+a_2^2+...+a_r^2=a_{r+1}^2 $$

then

$$ \left(\frac{a_1}{a_{r+1}}\right)^2+...+\left(\frac{a_r}{a_{r+1}}\right)^2=1 $$

so

$$ \left(\left(\frac{a_1}{a_{r+1}}\right)^2+...+\left(\frac{a_r}{a_{r+1}}\right)^2\right)\left(\frac{3}{5}\right)^2+\left(\frac{4}{5}\right)^2=1 $$

then we can just multiply both sides by $(5a_{r+1})^2$ and get the $r+1$ step.


$$\begin{cases}3^2+4^2=5^2\\a_1^2+a_2^2+\cdots+a_r^2=a_{r+1}^2\end{cases}\iff (3a_1)^2+(3a_2)^2+\cdots+(3a_r)^2=3^2a_{r+1}^2=(5^2-4^2)a_{r+1}^2$$

$$\iff(3a_1)^2+(3a_2)^2+\cdots+(3a_r)^2+(4a_{r+1})^2=(5a_{r+1})^2$$

Thus we've proved this using induction. $\ \ \ \square$

This is a simplified version of Hans Spielgarten's answer (which unnecessarily uses division).


Let us start with the good old $3^2+4^2=5^2$, that is, $a_1=3$, $a_2=4$, and $a_3=5$, which gives a sequence of length $3$, and produce a sequence of length $4$.

The idea is to multiply the first two terms of our previous sequence through by $3$, and add terms $4\cdot 5$ and $5\cdot 5$. So for $r=4$ our sequence is $3\cdot 3$, $3\cdot 4$, $4\cdot 5$, and $5\cdot 5$.

For a sequence of length $5$, multiply the first three terms of the previous sequence by $3$, and add $4\cdot 5\cdot 5$ and $5\cdot 5\cdot 5$.

Continue.


Hint $$2k+1=(k+1)^2-k^2 \\ 4k=(k+1)^2-(k-1)^2$$

Use this to show that $a_r^2$ is the difference of two perfect squares. This proves immediately the inductive step.