I've been self-studying summation of series and there's this one question that I can't seem to completely understand.
The question is:
Find the sum of the series
$1^2$ + $2$ x $2^2$ + $3^2$ + $2$ x $4^2$ +..... $2(n-1)^2$ + $n^2$
where n is odd
Here's what I did:
I broke the series into two parts so that I had $n^2$ and then $2(n-1)^2$ and applied the summation formula
For $n^2$, I got $\sum$$r^2$ and for $2(n-1)^2$, I expanded it first and got my final summation as $2$$\sum$ $r^2$ - $2r$ + $1$
In the working done in my book, however, they do break the series into two parts but for $2(n-1)^2$ they use the sum of square formulas and come up with the term $\frac{4\left(\frac{n-1}{2}\right)\left(\frac{n+1}{2}\right)n}{6}$
Can anyone please explain or give me a hint as to how they came up with that formula?
I've been stuck on this for quite some time and I would greatly appreciate any help!