Hint for $(n!+1,(n+1)!)$, stuck at $ (n!+1,n+1)$

Hint $ $ Consider $\,(n+1,n!+1).\,$ If prime $\,p\ |\ n+1\,$ and $\,p \le n\,$ then $\,p\ |\ n!\,$ so $\,p\nmid n!+1.\,$ Therefore the gcd $ = 1\,$ if $\,n+1\,$ is composite. For $\,n+1\,$ prime use Wilson's theorem.


You've done great work!

So yes, you know that the only numbers that could possible divide both sides are $n+1$ or $1$ (which I consider to be the hard part). So we ask ourselves, what is $n! + 1 \mod (n+1)$. If it's zero, solid. If not, relatively prime.

What does Wilson's Theorem say again? (I love it when we get to use Wilson's Theorem for anything, as its applications sort of rarely come up).


Let

$gcd(n!+1,(n+1)!)=d$.\ $\therefore d/n!+1, d/(n+1)n!$.\ $\Rightarrow d/n!+1,d/n+1,d/n!$.\ $\Rightarrow d/n!+1-n!$.\ Hence we get $d/1$. It follows that $d=1$.