Greatest common divisor for expression given.

75 Views Asked by At

Marked as Duplicate question: (Updated) Is there an expression I can derive to get this?

I know the gcd>1 but I don't know how to get an expression for it? Or if this is not possible, how do I show the gcd>1?

2

There are 2 best solutions below

1
On BEST ANSWER

Note that by Wilson's theorem

$$(p-1)!+1\equiv 0 \pmod p\iff(p-1)(p-2)!+1\equiv 0 \pmod p \iff p(p-2)!-(p-2)!+1\equiv 0 \pmod p\iff (p-2)!-1\equiv p(p-2)!\equiv 0 \pmod p$$

thus since $$p|[(p-2)!-1]\implies \gcd((p-2)!-1,p)=p$$

1
On

Hint:  use Wilson's theorem to show that $\,p \mid (p-1)! - (p-1) = (p-1)\big((p-2)!-1\big)\,$, then $\,\gcd(p,p-1)=1\,$ implies that $\,p \mid (p-2)!-1\,$ by Euclid's lemma.