<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 $n=1$ the formula holds,

$$S_n=1^2+3^2+5^2+\cdots+(2n-1)^2$$
  $$S_{n+1}=1^2+3^2+\cdots+n^2+(2n+1)^2$$
  $$\bbox[5px,border:2px solid red]{S_{n+1}-S_n=(2n+1)^2}$$

Now if,
$$S_n=\frac{n(2n-1)(2n+1)}{3}$$$$$$
$$S_{n+1}=\frac{(n+1)(2n+1)(2n+3)}{3}$$$$$$
$$S_{n+1}-S_n=\frac{(n+1)(2n+1)(2n+3)}{3}-\frac{n(2n-1)(2n+1)}{3}$$$$$$
$$=(2n+1)\frac{(n+1)(2n+3)-n(2n-1)}{3}$$$$$$
$$=(2n+1)\frac{(n)(2n+3)-n(2n-1)+(2n+3)}{3}$$$$$$
$$=(2n+1)\frac{6n+3}{3}$$$$$$
$$S_{n+1}-S_n=(2n+1)^2$$$$$$
Hence proved....
</s>