# Thread: Formula for sum of squared odd numbers.

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

Hello!

I'm having trouble proving this relation:

$\displaystyle 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:

$\displaystyle 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 $\displaystyle P_{n}$ be the statement that: $\displaystyle 1^2+3^2+5^2+...(2n+1)^2=\frac{(n+1)(2n+1)(2n+3)}{3 }$

Base case: True.

Inductive step: Assuming $\displaystyle P_{k}$ is true, it remains to show that $\displaystyle P_{k+1}$ is also true, that is: $\displaystyle 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:
$\displaystyle \text{LHS} = 1^2 + 3^2 + ... + (2k + 3)^2$
$\displaystyle \text{LHS} = \underbrace{1^2 + 3^2 + ... + (2k + 1)^2}_{P_{k}} + (2k+3)^2$ (I just expanded the '...' a bit and noticed that $\displaystyle P_{k}$ is 'in' there)
$\displaystyle \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 $\displaystyle {\color{red}(1)}$ and $\displaystyle {\color{red}(2)}$ are the same.

Simplify $\displaystyle {\color{red}(1)}$ and notice that in $\displaystyle {\color{red}(2)}$:
$\displaystyle \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}.}$$\displaystyle \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

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

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

Thanks.

4. Hello, Aslak!

Prove: .$\displaystyle 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: . $\displaystyle 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 $\displaystyle (2n+1)^2$

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

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

. . $\displaystyle 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 $\displaystyle (2n)^2$ is:

. . $\displaystyle 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]$

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

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

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

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

5. Now I fully understand. Thank you.