<s>[INST] Prove this sequence using induction Prove the following formula for all positive intergers $n$ using induction:
$1^2+3^2+5^2+...+(2n-1)^2=(n(2n-1)(2n+1))/3$
I have pretty gotten through the whole induction, but something seems wrong with my algebra. Can someone provide an answer to correct my algebra?
Induction step:
$1^2+3^2+...+(2n-1)^2+(2n+1)^2=(n+1)(2(2n+1)-1)(2(n+1)+1)/3$
$n(2n-1)(2n+1)/3+3(2n+1)^2/3=(n+1)(2(2n+1)-1)(2(n+1)+1)/3$
$4n(2n-1)(2n+1)/3=(n+1)(2n+3)/3$
What is wrong?
 [/INST] For $2n-1 = 1$:
$$1^2 = \frac{1(2*1-1)(2*1+1)}{3} = \frac{3}{3} = 1$$
Assuming the formula works for $n=2k-1$, where $k$ is some integer, for $n=2(k+1)-1$:
$$1^2+3^2+...+(2k-1)^2+(2(k+1)-1)^2 =$$
$$ \frac{k(2k-1)(2k+1)}{3} + (2(k+1)-1)^2 \stackrel{?}{=} \frac{(k+1)(2(k+1)+1)(2(k+1)-1)}{3} $$
By expanding the right hand side of the equation:
$$\frac{(k+1)(2(k+1)+1)(2(k+1)-1)}{3} = \frac{4k^3+12k^2+11k+3}{3}$$
And by simplifying the left hand side of the equation:
$$\frac{k(2k-1)(2k+1)}{3} + (2(k+1)-1)^2 = \frac{4k^3-k}{3} + (2k+1)^2 = \frac{4k^3-k}{3}+4k^2+4k+1 = \frac{4k^3+12k^2+11k+3}{3}$$
Finally:
$$ \frac{k(2k-1)(2k+1)}{3} + (2(k+1)-1)^2 = \frac{(k+1)(2(k+1)+1)(2(k+1)-1)}{3} $$
And so for any $n$, where $2n-1 \in \mathbb{N}$, this formula holds:
$$1^2 + 3^2 + ... + (2n-1)^2 = \frac{n(2n-1)(2n+1)}{3}$$
</s>