<s>[INST] Finding sum of none arithmetic series I have a question to find the sum of the following sum:
$$
S = \small{1*1+2*3+3*5+4*7+...+100*199}
$$
I figured out that for each element in this series the following holds:
$$
a_n = a_{n-1} + 4n - 3
$$
But I don't know where to go from here, I tried subtracting some other series but that did not work very well
 [/INST] Via generating functions we first find the generating function for each term and then sum them up. I'll build from the ground up. It may look overcomplicated but it also doesn't require remembering too many special identities. Our goal is to find $S_{99}$ where
\begin{align*}
S_m = \sum_{n=0}^{m} a_n
\end{align*}
where
\begin{align*}
a_0 &= 1 \\
a_n &= (n + 1)(2n + 1) \\
    &= a_{n-1} + 4n + 1
\end{align*}
Now to find the generating function for our $a_n$ we find
\begin{align*}
A(x) &= \sum_{n=0}^{\infty} a_n x^n \\
A(x) - a(0) &= \sum_{n=1}^{\infty} (a_{n-1} + 4n + 1) x^n \\
A(x) - 1 &= \sum_{n=1}^{\infty} a_{n-1}x^n + \sum_{n=1}^{\infty} (4n +1) x^n \\
A(x) - 1 &= x\sum_{n=0}^{\infty} a_{n}x^n + (\sum_{n=0}^{\infty} (4n +1) x^n) - (4*0 + 1) \\
A(x) &= xA(x) + (4\frac{x}{(x - 1)^2} + \frac{1}{x-1}) \\
(1 - x)A(x) &= \frac{4x + (1 - x)}{(1 - x)^2} \\
A(x) &= \frac{3x + 1}{(1 - x)^3}
\end{align*}
Summing them all up is easy enough, since $S_0 = 0$:
\begin{align*}
S(x) &= \sum_{n=0}^{\infty} S_n x^n \\
S(x) - S(0) &= \sum_{n=1}^{\infty} (S_{n - 1} + [y^n]A(y)) x^n \\
(1 - x)S(x) &= A(x) \\
S(x) &= \frac{3x + 1}{(1 - x)^4}
\end{align*}
Now we want to find the coefficient for $S(x)$
\begin{align*}
[x^n]S(x) &= [x^n]\frac{3x + 1}{(1 - x)^4} \\
&= [x^n]\left(3x + 1\right) \sum_{n=0}^{\infty}\binom{n + 3}{3}x^n \tag{1} \\
&= \left(3[x^{n-1}] + [x^n]\right) \sum_{n=0}^{\infty}\binom{n + 3}{3}x^n \tag{2}\\
&= 3\binom{n+2}{3} + \binom{n+3}{3}\\
&= \frac{1}{2}(n+2)(n+1)n + \frac{1}{6}(n+3)(n+2)(n+1)
\end{align*}


*

*In (1) we use the binomial series representation

*In (2) we use the linearity of the coefficient of operator and $[x^n]x^kS(x)=[x^{n-k}]S(x)$.
Finally, plugging in $n = 99$: $\frac{1}{2}*101*100*99 + \frac{1}{6}*102*101*100 = 671 650$
</s>