<s>[INST] Sum of an arithmetic progression Hi I cannot for the life of me remember how to use the arithmetic progression formula can someone help?   
I just need to find it for this sequence:
$$5n^2 + (5n^2 - 1) + (5n^2 - 2) + \ldots + (5n^2 - n)$$
 [/INST] We have
\begin{align*}5n^2 + (5n^2 - 1) + (5n^2 - 2) + \ldots + (5n^2 - n)&= \overbrace{5n^2+5n^2+\ldots+5n^2}^{(n+1) \text{ times}}-(1+2+\ldots+n)\\ 
&= 5n^2(n+1)-(1+2+\ldots+n)\end{align*}
Now, if $S=1+2+\ldots+n$, then
\begin{align*}2S &= (1+2+\ldots+n)+(1+2+\ldots+n)=(n+1)+(n-1+2)+\ldots+\big(n-(n-1)+n\big)\\ &=n(n+1)\end{align*}
So that $S=n(n+1)/2$ and thus
$$ 5n^2 + (5n^2 - 1) + (5n^2 - 2) + \ldots + (5n^2 - n)= 5n^2(n+1)-\frac{n(n+1)}{2}=\frac{n (n+1) (10 n-1)}{2}$$
</s>