Consider the sum $$\sum_{i=1}^n (2i-1)^2 = 1^2+3^2+...+(2n-1)^2.$$
I want to find a closed formula for this sum, however I'm not sure how to do this. I don't mind if you don't give me the answer but it would be much appreciated. I would rather have a link or anything that helps me understand to get to the answer.
EDIT: I Found this question in a calculus book so I don't really know which tag it should be.
Hint: $\sum_{i=1}^ni^2=\frac{n(n+1)(2n+1)}{6}$ and $\sum_{i=1}^ni=\frac{n(n+1)}{2}$. And last but not least $$(2i-1)^2=4i^2-4i+1.$$
Edit: Let's prove that $\sum_{i=1}^ni=\frac{n(n+1)}{2}$. We proceed by induction on $n$. If $n=1$ the statement is trivial. Now suppose the statement holds for $n\geq 1$. Then \begin{eqnarray}\sum_{i=1}^{n+1}i&=&\sum_{i=1}^ni+(n+1)\\ &=&\frac{n(n+1)}{2}+(n+1)\\ &=& (n+1)(\frac{n}{2}+1)\\ &=& \frac{(n+1)(n+2)}{2}.\end{eqnarray} Here we used the induction hypothesis in the second equation. This proves the statement by induction. You can prove the other formula in a similar fashion.