Number Theory- $\gcd( p!,(p-3)! -1)$

177 Views Asked by At

If $p$ is a prime greater then $3$. Then find $$ \gcd(p!,(p-3)!-1) $$

$\gcd$ is probably equal to $1$. But how can I show that? I think Wilson's theorem but it doesn't help me. What should I do?

2

There are 2 best solutions below

2
On

These are hints rather than an answer.

You should be able to use Wilson's theorem to show that $p$ is not a common factor. Now the only other possible common factors are factors of $(p-1)$ or $(p-2)$ (why?). You should be able to argue that all prime factors of $(p-1)$ cannot work. For $p-2$ there are two cases: either it is composite, when you argue as for $p-1$, or it is prime and you use Wilson's theorem again.

1
On

If possible let $q$ be a prime dividing the both $p!$ and $(p-3)!-1$. Then $q\leq p$. If $q=p$ then we get, $p|(p-3)!-1$. Then from Wilson's theorem we get, $p=3$ (why?). So $q<p$.

Now if $q\leq p-3$ then from $q|(p-3)!-1$, we arrive at a contradiction. So $p-2\leq q<p$. Now $q\neq p-1$, so $q$ must be equal to $p-2$.

So $q|(p-3)!-1\implies q|(q-1)!-1$. Which leads to a contradiction from Wilson's theorem.

Hence we obtain $\gcd(p!,(p-3)!-1)=1$.