# Thread: Prove variation of Wilson

1. ## Prove variation of Wilson

I'm trying to prove this for all $n \geq 1$

$(p-1)!^{p^{n-1}}\equiv -1\bmod p^n$

I think it's just a variation of Wilson's theorem but I can't seem to prove. I've tried induction but I can't change from $\bmod p^n$ to $\bmod p^{n+1}$

Any help would be great?

2. Originally Posted by alan4cult
I'm trying to prove this for all $n \geq 1$

$(p-1)!^{p^{n-1}}\equiv -1\bmod p^n$

I think it's just a variation of Wilson's theorem but I can't seem to prove. I've tried induction but I can't change from $\bmod p^n$ to $\bmod p^{n+1}$

Any help would be great?
Hint: If $a\equiv b(\bmod p^k)\implies a^p \equiv b^p (\bmod p^{k+1})$.

3. Originally Posted by ThePerfectHacker
Hint: If $a\equiv b(\bmod p^k)\implies a^p \equiv b^p (\bmod p^{k+1})$.
How can I prove this fact?

4. Originally Posted by alan4cult
How can I prove this fact?
Write $a = b + cp^k \implies a^p = (b+cp^k)^p \implies a^p = b^p + pb^{p-1}cp^k + N$ where $p^{k+1}|N$.
Thus, $a^p \equiv b^p (\bmod p^{k+1})$.

5. Originally Posted by ThePerfectHacker
Write $a = b + cp^k \implies a^p = (b+cp^k)^p \implies a^p = b^p + pb^{p-1}cp^k + N$ where $p^{k+1}|N$.
Thus, $a^p \equiv b^p (\bmod p^{k+1})$.
Excellent that solves my problem. Thank you.