$25! \pmod{78125}$ is a problem I'm working on.
Since $78125$ looked very divisible by $5$, I checked, and found that $78125 = 5^7$.
Then I thought, if there are seven factors 5 in $25!$, then $25! \equiv 0 \mod 78125$, but I only found $25$ to be divisible by 5 six times, so I don't think that got me anywhere.
Am I even on the right track here?
Thanks in advance for any help!
We can utilize the fact that if $a_1 n \equiv a_2 n \pmod{N}$, then $a_1 \equiv a_2 \pmod{\frac{N}{\gcd(n, N)}}$. In particular, we can write $25! \equiv k \cdot 5^6 \pmod{5^7}$, and $k = (1 \cdot 2 \cdot 3 \cdot 4)^5 \cdot (1 \cdot 2 \cdot 3 \cdot 4)$. We can compute $k$ mod $5$ with the aforementioned property to get $k \equiv 24^6 \equiv 1 \pmod{5}$.
Note $k$ must be either $0, 1, 2, 3, 4$ because there are only $5$ multiples of $5^6$ in $5^7$.