Problem

Source: Simon Marais MC 2019 B2

Tags: factorial, number theory



For each odd prime number $p$, prove that the integer $$1!+2!+3!+\cdots +p!-\left\lfloor \frac{(p-1)!}{e}\right\rfloor$$is divisible by $p$ (Here, $e$ denotes the base of the natural logarithm and $\lfloor x\rfloor$ denotes the largest integer that is less than or equal to $x$.)