TITLE: Every positive power of $5$ appears in the last digits of bigger power of $5$
QUESTION [5 upvotes]: Problem. Show that for every positive integer $n$, there is an integer $N > n$ such that the number $5^n$ appears as the last few digits $5^N$. For example, if $n = 3$, we have $5^3 = 125$ and $5^5 = 3125$, so $N = 5$ would satisfy.
This is a problem from the worksheet of the class Putnam Seminar at CMU. Please give hints towards the right direction and not the full solutions. Thanks!!

REPLY [2 votes]: We will prove that there exists a $N$ such that $5^n$ and $5^N$ have the same last $n$ digits
So what we need to do is to find $5^N\equiv 5^n\pmod{10^n}$
This can be achieved by setting $N=n+\phi (2^n)$
Since $5^N\equiv 5^n\pmod{5^n}$ and $5^N\equiv 5^n\pmod{2^n}$