# Remainder of $(1\cdot2\cdots102)^3$ modulo $105?$

I am having trouble in finding the remainder of $$(1\cdot2\cdots102)^3\mod 105$$

It is not possible to apply Wilson's Theorem here because 105 is composite. Can anybody help me?

$$105 = 3 \cdot 5 \cdot 7, 102!$$ is divisible all of $$3,5$$ and $$7,$$ therefore $$102!^3$$ is divisible $$105$$
Hint: Yes, $$105$$ is composite. So while you can't use Wilson's theorem, it actually makes the problem a lot easier, rather than more difficult. Think about exactly why Wilson's theorem fails for composite numbers: What is $$(n-1)!\pmod n$$ in those cases?
• @LuisGimenoSotelo Another hint: $105 = 3\cdot 5\cdot 7$. Now take a close look at your product. What numbers are included there? – Arthur May 20 at 14:59
• @LuisGimenoSotelo Don't write it as $(n-3)!^3$, write it as $1\cdot 1\cdot 1\cdot 2\cdot 2\cdot 2\cdot 3\cdots$ (don't write all of it, just imagine that you are). Compare what you get there to $105 = 3\cdot 5\cdot 7$ and see if you can spot anything. Apart from that, I have given you two substantial hints, and Reinstein has given you the actual answer. I don't know what more to do for you. – Arthur May 20 at 15:10