9

I have to compute $d=\gcd(0!+1!+\ldots+n!, (n+1)!)$, so let $a=0!+1!+\ldots+n!$ and $b=(n+1)!$. Then:

$a=0!+1!+\ldots+n!=3!+0!+1!+2!+4!+...+n!=6+4+4!+...+n! \equiv 2 \mod 4$

Thus, $a$ and $b$ are even, but $4$ does not divide $a$, so $2 | d$. Now, if no other prime $p>2$ divides $a$ and $b$ we will have $d=2$. It is enough then to check the case where $n+1=p$, obviously, $p|(n+1)!$, so I have to check that $p$ does not divide $a=0!+1!+\ldots+n!=0!+1!+\ldots+(p-1)!\equiv 1!+\ldots+(p-2)! \mod p$

But I don't know how to continue. I'm sure that this is the way, but I don't find the tools to prove it.

1 Answers1

4

Let me first summarize the observations you already made yourself, using the following notations: $S_n=1+1+2!+\ldots + n!$, $d_n=(S_n,(n+1)!)$

Then $2|d_n$, $2^2\nmid d_n$; the second property follows $2^2\nmid S_3$, but $2^2|(n+1)!$ for $n\ge 3$ and $S_{n+1}=S_n+(n+1)!$ so $2^2\nmid S_n$ for all $n$ by induction. Also, $d_n=2$ initially; a new prime $p$ would occur in $d$ precisely if $S_{p-1}\equiv 0 \bmod p$. We suspect that this happens for no $p$, which would imply that $d_n=2$ for all $n$.

After some googling, I found that the conjecture that $S_{p-1}\not\equiv 0\bmod p$ is known as Kurepa's conjecture, and it seems that its status is unclear (see also the comment at the linked question).