3

For any positive integer $n$ I need to prove that $\gcd(n!,\ n+1)=1$ or $n+1$ (except one integer). I need to prove both cases and for which $n$ exactly it exists.

I tried to use many gcd properties on this but didn't find anything...

TMM
  • 9,976
baaa12
  • 754

3 Answers3

16

if $n + 1$ is prime, then $$GCD = 1$$ else $n + 1$ is composite, if $n + 1 \ne p^2, p$ prime, then $$\exists a, b \le n\;( a \ne b \wedge n+1 = ab ) \implies n+1 = ab | n! \implies GCD = n+1$$ else if $n + 1 = p^2, p > 2$ prime, then $$1 < p < 2p \le n \implies p(2p) | n! \implies n+1 = p^2 | n! \implies GCD = n+1$$ else $n + 1 = 2^2$ and $$GCD = \gcd(3!,4) = 2$$

Conclusion: $GCD = \gcd(n!,n+1) = 1$ or $n+1$ except for the case $n = 3$.

achille hui
  • 122,701
6

Hint: Is $n+1$ prime? What if it is not?

Lord_Farin
  • 17,743
0

Hint: either $n+1$ is prime or not. The two cases lead to different values.

mau
  • 9,774