0

A number $n$ is self-reproducing if the decimal digits of $n$ appear at the tail end of $n^{2}$ (in the same order); for example, $76$ is self-reproducing, since $76^{2}=5776$. Use congruences to find the two self-reproducing numbers $n$ such that $100<n<999$.

Here's the solution:

We see numbers $n$ such that $n^{2}\equiv n\pmod {1000}$. Thus, $n^{2}\equiv n\pmod {8}$, giving $n\equiv 0, 1\pmod {8}$. Also, $n^{2}\equiv n\pmod {125}$, so $125\mid n(n-1)$, so $n\equiv 0, 1\pmod {125}$. The numbers $n$ between $100$ and $999$ with $n=0, 1\pmod {125}$ are $125, 126, 250, 251, 375, 376, 500, 501, 625, 626, 750, 751, 875, 876$. Of these, the only $n\equiv 0, 1\pmod {8}$ are $376$ and $625$.

Above is the complete solution for this problem. But I do not understand, where/how did the $1000$ come from at first in $n^{2}\equiv n\pmod {1000}$? I can observe that $1000=2^{3}\cdot 5^{3}$ by the prime factorization and that's why we considered two cases of both $n^{2}\equiv n\pmod {8}$ and $n^{2}\equiv n\pmod {125}$ but I also do not understand how to get the solutions of $n\equiv 0, 1\pmod {8}$ and $n\equiv 0, 1\pmod {125}$. Can anyone please explain about these?

0 Answers0