<s>[INST] Find $\sum_{r=1}^{20} (-1)^r\frac{r^2+r+1}{r!}$. 
Calculate $$\sum_{r=1}^{20} (-1)^r\frac{r^2+r+1}{r!}\,.$$

I broke the sum into partial fractions and after writing 3-4 terms of the sequence I could see that it cancels but I wasn't able to arrive at the exact expression. I understand that it's trivial but for whatever reason I just couldn't get it so just need a little help.
 [/INST] $\mathcal{Hint}$
After writing $r=1$ separately, use the fact that the numerator can be written as $r(r-1)+2r+1$.
So, $$(-1)^r\frac{r^2+r+1}{r!}=(-1)^r\left(\frac{1}{(r-2)!}+\frac{2}{(r-1)!}
+\frac{1}{r!}\right)$$
Can you finish now?
$\mathbf{Edit:-}$
Writing a few terms for $r=2$ onwards, we get
$$\left(\frac{1}{0!}+\frac{2}{1!}+\frac{1}{2!}\right)-\left(\frac{1}{1!}+\frac{2}{2!}+\frac{1}{3!}\right)+\left(\frac{1}{2!}+\frac{2}{3!}+\frac{1}{4!}\right)-...+\left(\frac{1}{16!}+\frac{2}{17!}+\frac{1}{18!}\right)-\left(\frac{1}{17!}+\frac{2}{18!}+\frac{1}{19!}\right)+\left(\frac{1}{18!}+\frac{2}{19!}+\frac{1}{20!}\right)
$$
Notice how every term with denominator $2!,3!,...,18!$ completely cancel...Numerators of both $1$ and $19!$ are $2-1=1$ ...and we have the first and last terms $0!$ and $20$ as it is...
So your final answer is $\frac{1}{0!}+\frac{1}{1!}+\frac{1}{19!}+\frac{1}{20!}-3$.
</s>