Here's the question you clicked on:
FoolForMath
Just another cute number theory problem: \((1)\) Find the remainder when \(100!^{100!}+99\) is divided by \(101\). PS: This problem is posted on request of @Limitless
first, you should see that 100^k mod 101 is equal to 100, if k is odd and 1 if k is even. The same happens with 100!^k. So, 100!^100!=1mod 101 and 100!^100!+99=100 mod 101
By Wilson's theorem, \[ 100! \equiv -1 \pmod {101} \] Since \(100!\) is even: \[100!^ {100!} \equiv 1 \pmod {101} \implies 100!^ {100!} +99 \equiv 100 \pmod {101} \] Hence, \(100\) is the remainder. Ref: http://en.wikipedia.org/wiki/Wilson's_theorem
EDIT: \[ 100!^ {100!} \equiv 1 \pmod {101} \]\[\implies 100!^ {100!} +99 \equiv 100 \pmod {101} \]
You don't even need Wilson's Theorem for this. Since \(100!\) is a multiple of \(100\), and coprime to 101, we have that \(100!^{100!}\equiv1\pmod{101}\) by Fermat's Little Theorem. Hence, \(100!^{100!}+99\equiv100\pmod{101}\).