\section*{Problem 5 - 041245}

Determine all digit triples \((x, y, z)\) with \(x, y, z \neq 0\), such that

\[
\sqrt{(x x x \ldots x)-(y y y \ldots y)}=(z z z \ldots z)
\]

\((x x x \ldots x): 2n\) digits; \((y y y \ldots y): n\) digits; \((z z z \ldots z): n\) digits

is satisfied for at least two different positive natural numbers \(n\)!

Then, give all numbers \(n\) for which (1) holds with the determined triples!
}

Since we are only dealing with positive numbers, we can square both sides of (1):

\[
\begin{gathered}
(1) \Leftrightarrow(x x x \ldots x)-(y y y \ldots y)=(z z z \ldots z)^{2} \\
\Leftrightarrow \frac{1}{9}\left(10^{2 n}-1\right) x-\frac{1}{9}\left(10^{n}-1\right) y=\left(\frac{1}{9}\left(10^{n}-1\right) z\right)^{2} \Leftrightarrow\left(10^{n}+1\right) x-y=\frac{1}{9}\left(10^{n}-1\right) z^{2}
\end{gathered}
\]

In the special case \(n=1\), (2) becomes \(11 x=z^{2}+y\), and by substitution, one finds that for each digit \(z>1\) there is exactly one \(y\) such that the right-hand side is divisible by 11.

For \(n \geq 2\), we consider (2) modulo 100 (note \(\left.\frac{1}{9}\left(10^{n}-1\right)=111 \ldots 11 \equiv 11\right) 1\).

\[
x-y=11 z^{2}
\]

For \(z=1,2, \ldots, 9\), \(11 z^{2}\) modulo 100 is \(11,44,99,76,75,96,39,4,91\). \(x-y\) can only take the values \(0, \ldots, 8\) or \(92, \ldots, 99\).

Thus, only solutions with \(z=3, z=6\) or \(z=8\) are possible. \(x-y\) must then be equal to \(-1, -4\) or +4 (not just modulo 100). We check whether this necessary condition is also sufficient by substituting into (2).
- \(z=3, y=x+1\) yields \(10^{n} x=10^{n}\), so \(x=1\), i.e., \((x, y, z)=(1,2,3)\) is a solution for all \(n\).
- \(z=6, y=x+4\) yields \(10^{n} x=10^{n} \cdot 4\), so \(x=4\), i.e., \((x, y, z)=(4,8,6)\) is a solution for all \(n\).
- \(z=8, y=x-4\) leads to \(10^{n} x=\frac{1}{9}\left(10^{n}-1\right) \cdot 64-4\), which is equivalent to \(9 \cdot 10^{n} x=64 \cdot 10^{n}-100\). For \(n \geq 3\), this equation is not solvable (as seen modulo 1000), for \(n=2\) the equation becomes \(9 x=63\), so \((x, y, z)=(7,3,8)\) is an additional solution for \(n=2\).

The following table contains all solution quadruples \((n, x, y, z)\). The 2nd and 5th rows are actually redundant, as they are special cases of the last two rows, and were only included for clarity of the derivation.

\begin{tabular}{cccc|cccc|cccc}
\(\mathrm{n}\) & \(\mathrm{x}\) & \(\mathrm{y}\) & \(\mathrm{z}\) & \(\mathrm{n}\) & \(\mathrm{x}\) & \(\mathrm{y}\) & \(\mathrm{z}\) & \(\mathrm{n}\) & \(\mathrm{x}\) & \(\mathrm{y}\) & \(\mathrm{z}\) \\
1 & 1 & 7 & 2 & 1 & 1 & 2 & 3 & 1 & 2 & 6 & 4 \\
1 & 3 & 8 & 5 & 1 & 4 & 8 & 6 & 1 & 5 & 6 & 7 \\
1 & 6 & 2 & 8 & 1 & 8 & 7 & 9 & 2 & 7 & 3 & 8 \\
any & 1 & 2 & 3 & any & 4 & 8 & 6 & & & &
\end{tabular}

From this table of all solutions to (1), the answer to the problem statement is also evident: The only triples \((x, y, z)\) that are solutions to (1) for at least two different \(\mathrm{n}\) are \((1,2,3)\) and \((4,8,6)\).

For these triples, (1) holds for all positive natural numbers \(\mathrm{n}\).