## Task 33/66

We are looking for all natural numbers $z$ with $100 \leq z<1000$ that have the following property:

For any power $z^{k}$ with natural $k$, the last three digits are formed by the digits of $z$ in the same order.
According to the requirements of the task, for every natural $k$ it must hold that $z^{k}=1000 n+z$ (where $n$ is a natural number).

This implies $z^{k}-z=1000 n$, meaning that $z^{k}-z$ is divisible by 1000. Now, $z^{k}-z$ is divisible by both $z$ and $z-1$ (if $k>1$; this follows from the fact that $z=0$ and $z=1$ are roots of the polynomial $z^{k}-z$).

Since this holds for every $k>1$, it particularly holds for $k=2$, which means that $z(z-1)$ is already divisible by 1000.

We need to find all products of two consecutive three-digit natural numbers that are divisible by 1000.

It is $1000=2^{3} \cdot 5^{3}$. Since $z$ and $z-1$ are consecutive numbers, one of them is even, and the other is odd. Therefore, one of them must contain the factor $2^{3}=8$. Since the other is certainly divisible by 5, only numbers ending in 5 are possible for it, and for the first number, only numbers ending in 4 or 6 (but not 0, 2, 8) are possible.

Consequently, the second number must be divisible by 125 (otherwise, a factor 5 would appear alongside factors 2 in the first number, making the last digit 0). Thus, only the odd numbers 125, 375, 625, and 875 remain available, to which either 124 or 126, 374 or 376, 624 or 626, 874 or 876 belong as even numbers.

It is easy to verify that among them, only the numbers $z_{1}=376$ with $z_{1}-1=375$ and $z_{2}=625$ with $z_{2}-1=624$ satisfy the required conditions.