# Problem ; modulo p

1. Oct 13, 2012

### papacy

if p is prime and n is natural number, show that (p-n+1) . (p-2)! + n–1 =0 (mod p)

i think i have to show that (p-n+1) . (p-2)! = 0 (mod p) and n – 1 =0 (mod p)
using Wilson theorem
(p-1)!=-1(p)

Last edited: Oct 13, 2012
2. Oct 13, 2012

### DonAntonio

Well, of course $\,n-1\neq 0\pmod p\,$ almost always. Working modulo p in the following:

$$(p-2)!=\frac{(p-1)!}{p-1}=\frac{-1}{-1}=1\Longrightarrow (p-n+1)(p-2)!+n-1=(-n+1)\cdot 1+n-1=-n+1+n-1=0$$

DonAntonio

3. Oct 13, 2012

### papacy

thanks a lot.
very clever.
also i solve it inductances

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook