I'm trying to solve this congruence. I found that in $40!$ there are $9$ powers of $5$, but I'll need one more for $40!=0 \mod 5^{10}$. I thought about Euler's theorem or Wilson's, but couldn't find any correlation.
Asked
Active
Viewed 120 times
2
-
1Actually, there are $9$ (because $25=5^2$)... – Surb Jun 08 '22 at 11:58
1 Answers
2
Because $5^9$ divides $40!$, we can use $ka \bmod kb =k(a \bmod b)\,$ [mod distributive law] to get $40! \bmod 5^{10} = 5^9\cdot(\frac{40!}{5^9} \bmod 5)$. Hence we really only need to find the residue of $\frac {40!}{5^9} \bmod 5$. So separate $n \in 1 \cdots 40$ into two sets, those divisible by $5$ and those coprime to $5$:
The product of the $n$ coprime to $5$ is $$ (1 \cdot 2 \cdot 3 \cdot 4)^8 \equiv 1 \pmod 5,$$ whereas the multiples of $5$ (with all the fives divided out) contribute $$ 1 \cdot 2 \cdot 3 \cdot 4 \cdot 1 \cdot 1 \cdot 2 \cdot 3 \equiv (-1) \pmod 5.$$ Hence, we can write $$5^9 (\frac {40!}{5^9} \bmod 5) = 5^9 (1 \cdot -1 \bmod 5) = 5^9 \cdot 4$$

Bill Dubuque
- 272,048

LurchiDerLurch
- 569
-
1
-
-
-
2
-
2For the first part he is using the fact that $( (ka) \bmod (kb)) = k(a \bmod b)$ – DanielV Jun 08 '22 at 12:13
-
@Mathapprentice He's being unclear (not sure why). He's separating $n \in 1 \cdots 40$ into two groups, those that are divisible by 5 and those that aren't. For those that aren't, they are of the form $n=5a + b$ where $b$ goes $1, 2, 3, 4, 1, 2, 3, 4 \dots$ – DanielV Jun 08 '22 at 12:17
-
1@DanielV yes, I figured it out in the meantime. Now I'm putting the pieces all together – Math apprentice Jun 08 '22 at 12:19
-
I am sorry if I was unclear about the steps, I wrote the solution in bit of a rush. Feel free to edit it if anyone feels like it need refinement and/or clarification! :) – LurchiDerLurch Jun 08 '22 at 12:21
-
it's alright. Thanks for the explanation. Turns out it's a bit more challenging than I thought – Math apprentice Jun 08 '22 at 12:23
-
1@LurchiDerLurch Took up your offer to edit, please check if it matches your intentions closely enough – DanielV Jun 08 '22 at 12:35
-