<s>[INST] Point out my fallacy, in sequence and series. 
The sum of the first $n$--terms of the series $1^2+2\cdot2^2+3^2+2\cdot4^2+\cdots$ is $\dfrac{n(n+1)^2}{2}$, when $n$ is even. When $n$ is odd, the sum is?

I got the correct answer when is replaced $n\rightarrow (n+1)$ to make above valid for odd, but when I tried the different approach then something following had happened.
For $n$ even, last term $=n$ which is even and term before it $=n-1$ which is odd. Clubbing all odds and evens separately as follows:
$\big(1^2+3^2+\cdots +(n-1)^2\big)+2\big(2^2+4^2+\cdots+n^2\big)=\dfrac{n(n+1)^2}{2}\tag{1}$
For $n$ odd, last term $=n$ which is odd and term before it $=n-1$ which is even. Clubbing all odds and evens separately as follows:
$\big(1^2+3^2+\cdots +n^2\big)+2\big(2^2+4^2+\cdots+(n-1)^2\big)\tag*{}$
$=\big(1^2+3^2+\cdots +(n-1)^2\big)+2\big(2^2+4^2+\cdots+n^2\big)-n^2+(n-1)\tag*{}$
From equation $(1)$
$=\dfrac{n(n+1)^2}{2}-n^2+(n-1)\tag*{}$
And answer given is: $\dfrac{n^2(n+1)}{2}$
please help.
 [/INST] For $n$ odd case: $$\big(1^2+3^2+\cdots +n^2\big)+2\big(2^2+4^2+\cdots+(n-1)^2\big) \\= \big(1^2+3^2+\cdots +n^2\big)+2\big(2^2+4^2+\cdots+(n+1)^2\big) - 2(n+1)^2 \\= \frac{(n+1)(n+2)^2}{2} - 2(n+1)^2 \\= \frac{n^2(n+1)}{2}.$$
Let $T1$ denote number of terms contributed by odd indexes (for example $1^2, 3^2$ etc) and $T2$ denote number of terms contributed by even indexes (for example $2.2^2, 2.4^2$ etc). Note that, for $n$ odd case, $T1 = T2 + 1$ and for $n$ even case, $T1 = T2$.
</s>