<s>[INST] Prove by mathematical induction that $\sum_{i=0}^n (2i-1)^2 = \frac{n(2n+1)(2n-1)}{3}$ One of my homework problems is to prove that $\sum_{i=1}^n (2i-1)^2 = \frac{n(2n+1)(2n-1)}{3}$
I already completed the basis step
$[2(1)-1]^2 = 1 $
$\frac{(1)[2(1)+1][2(1)-1]}{3} = 1$
Then I assumed that the proposition was true for n=k+1 which leaves me with
$\frac{k(2k+1)(2k-1)}{3}$ + $[2(k+1)-1]^2$ = $\frac{k[2(k+1)+1][2(k+1)-1]}{3}$
However, I am stuck here, as the term $[2(k+1)-1]^2$ produces a constant term and $\frac{k[2(k+1)+1][2(k+1)-1]}{3}$ (when the numerator is multiplied out) has no constants. Any ideas, guys?

Edits:
After reading some of the comments I found my original mistake. I should have written $\frac{(k+1)[2(k+1)+1][2(k+1)-1]}{3}$ instead of $\frac{k[2(k+1)+1][2(k+1)-1]}{3}$. 
This leaves me with $\frac{k(2k+1)(2k-1)}{3}$ + $[2(k+1)-1]^2$ = $\frac{(k+1)[2(k+1)+1][2(k+1)-1]}{3}$
However, I am still lost on what to do next. I'm not having any luck combining these fractions, anyone got good ideas?
 [/INST] What you have to prove is $$\frac{k(2k+1)(2k-1)}{3}+(2k+1)^2=\frac{(k+1)(2k+3)(2k+1)}{3}$$
The left-hand side is $$\frac{k(2k+1)(2k-1)+3(2k+1)^2}{3}=\frac{(2k+1)(2k+3)(k+1)}{3}$$
$$(2k+1)(2k^2-k+6k+3)$$ and $$(2k+3)(k+1)=2k^2-k+6k+3$$
</s>