The sum of the first $n$ terms of the series $1^2+2 \cdot 2^2+3^2+2 \cdot 4^2+5^2+2 \cdot 6^2+\ldots$ is…
The sum of the first $n$ terms of the series $1^2+2 \cdot 2^2+3^2+2 \cdot 4^2+5^2+2 \cdot 6^2+\ldots$ is $\frac{n(n+1)^2}{2}$ when $n$ is even. When $n$ is odd the sum is