# Summation of odd numbers does not equal derived formula?

I was attempting to find the formula for the summation of odd integers, and as I was doing so, could not seem to make ends meet with the obvious truth that it should equal $n^2$. I attempted to use the formula $\frac{n(n+1)}{2}$ for the summation of a series to n in order to derive the $n^2$ but simply could not get there.

Since the summation of odd integers to the n-th odd integer should equal the summation of numbers to n minus the summation of even numbers to $n-1$, I have $$\frac{n(n+1)}{2}-2\left(1+2+3+ \ldots \frac{n-1}{2}\right) = \frac{n(n+1)}{2}-\frac{n-1}{2}\left(\frac{n-1}{2}+1\right)$$ and that simplifies to $$\frac{(n+1)^2}{4}$$ or $$\left(\frac{n+1}{2}\right)^2$$ which is not equal to the supposed (and definitely correct) $n^2$. Strangely, the above simplification also seems to work for the summation and produces the correct results. Why is there a discrepancy here? Am I missing something because shouldn't the two be equal?

• When you try to sum the first $n$ odd integers, be careful, are you adding $\underbrace{1+3+5+7+\dots+(2n-1)}_{n~\text{terms}}$ or are you adding $\underbrace{1+3+5+7+\dots+n}_{(n+1)/2~\text{terms}}$? – JMoravitz Oct 17 '17 at 3:38
• @JMoravitz I am adding the latter – Discrete Math Oct 17 '17 at 3:39
• Why? Which is the $n$'th odd integer? $n$? or $2n-1$? You should be using the former. Note that $1$ is the first odd positive integer, $3$ is the second, $5$ is the third and so on – JMoravitz Oct 17 '17 at 3:40
• @JMoravitz Okay, that makes much more sense. Thanks! – Discrete Math Oct 17 '17 at 3:41
• @DiscreteMath Now, I saw what JMoravitz was pointing to and what was your mistake. So, shall I delete my answer? – amsmath Oct 17 '17 at 3:43

## 2 Answers

You have not computed the sum of the first $n$ odd numbers. Instead, you've computed the sum of the odd numbers from $1$ to $n$ (assuming $n$ is odd): you computed the sum of all the integers from $1$ to $n$, then subtracted the even ones. If $n$ is odd, then it is the $k$th odd number where $k=\frac{n+1}{2}$ ($1$ is the $1$st odd number, $3$ is the $2$nd odd number, $5$ is the $3$rd odd number, ...), so what you found actually agrees with the formula.

$$\sum_{k=1}^{n}(2k-1) = 2\sum_{k=1}^nk - \sum_{k=1}^n1 = 2\frac{n(n+1)}2 - n = n^2.$$