Error in finding sum of $1\cdot 2+3\cdot 4+ \cdots \text{to}\space n\space \text{terms}$ To find sum of the series $1\cdot 2+3\cdot 4+ \cdots \text{to}\space n\space \text{terms}$
My approach,
Let S=$1^2+2^2+3^2 + \cdots +n^2$
If $n$ is even
S=$(1-2)^2+(3-4)^2+ \cdots +[(n-1)-n]^2+2(1 \cdot 2+3 \cdot 4+5 \cdot 6+ \cdots \text{to}\space \dfrac{n}{2}\space \text{terms})$
=$\frac{n}2+2(1 \cdot 2+3 \cdot 4+5 \cdot 6+ \cdots \text{to}\space \dfrac{n}{2}\space \text{terms})$
And we know,
$$S=\frac{n(n+1)(2n+1)}6$$
Therefore,$$2(1 \cdot 2+3 \cdot 4+5 \cdot 6+ \cdots \text{to}\space \frac{n}2\space \text{terms}) =\frac{n(n+1)(2n+1)}6-\frac{n}2$$
or $$2(1 \cdot 2+3 \cdot 4+5 \cdot 6+ \cdots \text{to}\space \frac{n}2\space \text{terms})=\frac{n}2.\frac{2n^2+3n-2}3$$
or $$(1 \cdot 2+3 \cdot 4+5 \cdot 6+ \cdots \text{to}\space \frac{n}2\space \text{terms})=\frac{n(n+2)(2n-1)}{24}$$
But, this is the sum of $\dfrac{n}{2}$ terms. To get sum of $n$ terms, we replace $n$ by $2n$
Thus,
$$(1 \cdot 2+3 \cdot 4+5 \cdot 6+ \cdots \text{to}\space n\space \text{terms})=\frac{n(n+1)(4n-1)}6$$
So, if input of $n$ is even result should be correct,
if $n=2$, sum (from formula) = $7$
However, actual sum is $14$ (=$1 \cdot 2+3 \cdot 4$).
What is the error in the above approach?
EDIT: I rechecked my calculations and also have written the steps but still the answer isn't coming right. Please tell in which step the problem lies.
Thanks for your time and patience.

Note that $$\frac{n(n + 1)(2n + 1)}{6} - \frac{n}{2} = \frac{n}{2}\frac{2n^{2} + 3n - 2}{3}$$ and if you divide this expression by $2$ you are supposed to get $$\frac{n(n + 2)(2n - 1)}{12}$$ but you get mistakenly $$\frac{n(n + 2)(2n - 1)}{24}$$ This is the source of error. If you fix this problem you will get the right formula $$(1\cdot 2) + (2\cdot 4) + \cdots + \{(2n - 1)\cdot (2n)\} = \frac{n(n + 1)(4n - 1)}{3}$$
