Prove that $n-1$ divides $n!\left(1+\sum\limits_{k=2}^{n}\frac{(-1)^k}{k!}\right)$.
There is a sequence: $a_1=1$, $a_{n}=n\cdot a_{n-1}+(-1)^n$. The question is to prove that $n-1$ divides $a_n$.
My approach was to notice the general formula for $a_n$, namely:
$$ a_n=n!\left(1+\sum_{k=2}^{n}\frac{(-1)^k}{k!}\right) $$
(this is trivial to verify just by plugging into the recursive relation). Now, how should I show that $n-1$ divides $$n!\left(1+\sum_{k=2}^{n}\frac{(-1)^k}{k!}\right)\ ?$$
At first, I thought it was trivial, then I noticed that the term in the parentheses is not an integer. My question is then:
- how to prove the claim that $n-1$ divides $a_n$ using the general formula,
and then:
- maybe it can be done only using the recurrence relation?