# Math Help - Formula for sum of squared odd numbers.

1. ## Formula for sum of squared odd numbers.

Hello!

I'm having trouble proving this relation:

$1^2+3^2+5^2+...(2n+1)^2=\frac{(n+1)(2n+1)(2n+3)}{3 }$

It's implied that I should use that:

$1^2+2^2+3^2+...+k^2=\frac{k(k+1)(2k+1)}{6}$

I've tried substituting k=(2n+1) in the second formula, but it's not working. I can't really see why it isn't...

Could someone lead me in the right direction here?

2. Proof by induction would work here.

Let $P_{n}$ be the statement that: $1^2+3^2+5^2+...(2n+1)^2=\frac{(n+1)(2n+1)(2n+3)}{3 }$

Base case: True.

Inductive step: Assuming $P_{k}$ is true, it remains to show that $P_{k+1}$ is also true, that is: $1^2+3^2+5^2+...(2(k+1)+1)^2=\frac{((k+1)+1)(2(k+1) +1)(2(k+1)+3)}{3} \qquad {\color{red}(1)}$

Modifying it a bit just to see what we're working with:
$\text{LHS} = 1^2 + 3^2 + ... + (2k + 3)^2$
$\text{LHS} = \underbrace{1^2 + 3^2 + ... + (2k + 1)^2}_{P_{k}} + (2k+3)^2$ (I just expanded the '...' a bit and noticed that $P_{k}$ is 'in' there)
$\text{LHS} = \frac{(k+1)(2k+1)(2k+3)}{3} + (2k+3)^2 \qquad{\color{red}(2)}$

Now we have to show that the right hand side of ${\color{red}(1)}$ and ${\color{red}(2)}$ are the same.

Simplify ${\color{red}(1)}$ and notice that in ${\color{red}(2)}$:
$\frac{(k+1)(2k+1)(2k+3)}{3} + (2k+3)^2 \: \: = \: \: \frac{(k+1)(2k+1)(2k+3) + 3(2k+3)^2}{3} \: \: = \: \: {\color{white}.}$ $\frac{(2k+3) \bigg[(k+1)(2k+1) + 3(2k+3)\bigg]}{3}$

And now it is a matter of simplifying the inside the brackets.

3. Ahh...that's a way.

Which yields

$\frac{(2k+3)(k+2)(2k+5)}{3}$

Which is equivalent to the $P_n$-statement for the case n=k+1.

Thanks.

4. Hello, Aslak!

Prove: . $S \;=\;1^2+3^2+5^2+\hdots +(2n+1)^2 \;=\;\frac{(n+1)(2n+1)(2n+3)}{3}$

It's implied that I should use: . $1^2+2^2+3^2+\hdots+k^2\:=\:\frac{k(k+1)(2k+1)}{6}$

S is the sum of the squares of the odd integers up to $(2n+1)^2$

Hence, it is the sum of the squares of all the integers up to $(2n+1)^2$
. . minus the sum of the squares of the even integers up to $(2n)^2.$

The sum of all squares up to $(2n+1)^2$ is:

. . $S_{\text{all}} \;=\;\frac{(2n+1)(2n+2)(4n +3)}{6} \;=\;\frac{(n+1)(2n+1)(4n+3)}{3}$

The sum of even squares up to $(2n)^2$ is:

. . $S_{\text{even}} \;=\;2^2 + 4^2 + 6^2 + \hdots + (2n)^2 \;= \;2^2\left[1^2 + 2^2 + 3^2 + \hdots + n^2\right]$

. . . . . . $= \;4\cdot\frac{n(n+1)(2n+1)}{6} \;=\;\frac{2n(n+1)(2n+1)}{3}$

Then: . $S \;=\;S_{\text{all}} - S_{\text{even}} \;=\;\frac{(n+1)(2n+1)(4n+3)}{3} - \frac{2n(n+1)(2n+1)}{3}$

. . Factor: . $S \;=\;\frac{(n+1)(2n+1)}{3}\bigg[(4n+3) - 2n\bigg]$

Therefore: . $\boxed{S \;=\;\frac{(n+1)(2n+1)(2n+3)}{3}}$

5. Now I fully understand. Thank you.