Example 4 Find the largest positive integer $n$, such that the system of equations
$$
(x+1)^{2}+y_{1}^{2}=(x+2)^{2}+y_{2}^{2}=\cdots=(x+k)^{2}+y_{k}^{2}=\cdots=(x+n)^{2}+y_{n}^{2}
$$

has integer solutions $\left(x, y_{1}, y_{2}, \cdots, y_{n}\right)$.
Analysis We use the properties of square numbers to handle the problem.
Solution When $n=3$, it is easy to know that the given system of equations has integer solutions ( $x=-2, y_{1}=0, y_{2}=1, y_{3}=0$ )

When $n=4$,
$$
\left\{\begin{array}{l}
y_{1}^{2}-y_{2}^{2}=2 x+3, \\
y_{2}^{2}-y_{3}^{2}=2 x+5, \\
y_{3}^{2}-y_{4}^{2}=2 x+7,
\end{array}\right.
$$

then $y_{1}, y_{2}, y_{3}, y_{4}$ alternate in parity, so
$$
\begin{array}{l}
2 y_{2}^{2}-\left(y_{1}^{2}+y_{3}^{2}\right)=2, \\
2 y_{3}^{2}-\left(y_{2}^{2}+y_{4}^{2}\right)=2 .
\end{array}
$$

If $y_{1}, y_{3}$ are odd, then $2 y_{2}^{2} \equiv 0(\bmod 8), 2+y_{1}^{2}+y_{3}^{2} \neq 0(\bmod 8)$, which is a contradiction.
Similarly: If $y_{1}, y_{3}$ are even, then $y_{2}, y_{4}$ are odd. The latter equation is also a contradiction, so the equation has no solution when $n=4$. Clearly, the equation has no solution when $n \geqslant 4$.
!Comment Choosing an appropriate modulus and using the properties of square numbers is one of the techniques for solving problems involving square numbers.