The problem is to find the smallest natural number $n$ so that its square's last $5$ digits are $00001$. $n$ and $n^{2}$ cannot begin with $0$.
I know that we have a lower bound on $n$, namely $\sqrt{100001}≈316.23$. Intuitively, I think the smallest natural number with the property has to be $100001$ and I have not found any counterexamples to this (in fact I checked using some code and it seems to be correct). I haven't been successful in proving this rigorously however. Do I use the lower bound in some way? How to approach this type of questions in general, i.e. how do digits respond to squaring/cubing?
All help is appreciated.
You want to find $n$ such that $n^2 \equiv 1 \pmod {10^5}$.
By Chinese remainder theorem, this is equivalent to $n^2 \equiv 1 \pmod {2^5}$ and $n^2 \equiv 1 \pmod {5^5}$.
We have $$n^2 \equiv 1\pmod {2^5} \iff n \equiv \pm 1 \pmod {2^4}$$ and $$n^2 \equiv 1 \pmod {5^5} \iff n \equiv \pm 1\pmod {5^5}.$$ Again by Chinese remainder theorem, these congruence relations give four possibilities of $n \mod 5\cdot 10^4$, namely $$n\equiv 1, 18751, 31249, 49999 \pmod {50000}.$$ From here, we see that the smallest such $n$ is $18751$.