2B. A four-digit number is a perfect square, such that if the same digit is subtracted from its digits, the resulting number is also a perfect square. Determine all such natural numbers.
Solution. Let the four-digit number be $\overline{a b c d}=A^{2}$, then from the condition we have

$$
\overline{(a-k)(b-k)(c-k)(d-k)}=B^{2}
$$

If we subtract the last two equations, we get

$$
1000 a+100 b+10 c+d-1000 a+1000 k-100 b+100 k-10 c+10 k-d+k=A^{2}-B^{2}
$$

which simplifies to $1111 k=A^{2}-B^{2}$. If we factorize, we have

$$
11 \cdot 101 \cdot k=(A-B)(A+B)
$$

Since $A^{2}$ and $B^{2}$ are four-digit numbers, we conclude that $32 \leq A \leq 99$ and $32 \leq B \leq 99$, from which $64 \leq A+B \leq 198$ and $0 \leq A-B \leq 67$. Since $A+B$ and $A-B$ have the same parity, we conclude that $A+B=101$ and $A-B=11 k$, where $k=1,3,5$. For $k=1, \overline{a b c d}=3136=56^{2}$, for $k=3, \overline{a b c d}=4489=67^{2}$ and for $k=5$ we get the number $\overline{a b c d}=6084$, which does not satisfy the condition of the problem.