<s>[INST] How to find the sum $\sum\limits_{k=1}^n (k^2+k+1)k!$? How to find the sum $$\sum^n_{k=1} (k^2+k+1)k!$$
What I tried as follows : 
$$\sum^n_{k=1} (k^2+k+1)k!$$
=$$\sum^n_{k=1} (k^2)k!+ \sum^n_{k=1} (k)k! + \sum^n_{k=1} (1)k!$$
Now we can write $\sum^n_{k=1} (k^2) $ as $$\frac{n(n+1)(2n+1)}{6}$$ but what to do with $k!$ please guide thanks.......
 [/INST] HINT:
$$(k^2+k+1)k!= (k+1)(k+2) k!+A (k+1)k!+B k!=(k+2)!+A (k+1)!+B k!$$
$$\implies k^2+k+1=(k+1)(k+2)+A(k+1)+B=k^2+k(3+A)+2+A+B $$
Equating the coefficients of $x,A+3=1\implies A=-2$
Equating the  constant terms, $A+B+2=1\implies B=-1-A=-1-(-2)=1$
So, $$(k^2+k+1)k!= (k+2)!-2(k+1)!+ k!=(k+2)!-(k+1)!-\{(k+1)!-k!\}$$
Can you recognize  the telescopic series? 
</s>