To find the sum of first $n$ numbers using the sum of odd numbers and even numbers

1.3k Views Asked by At

We know that the sum of first $n$ numbers is $\frac{n(n+1)}{2}$. So, I tried to derive it using the formula for sum of first $n$ odd numbers and sum of first $n$ even numbers. Here's what I did

What I tried was to split $$1+2+3+\dots + n$$ into $$(1+3+5+\dots + (2n-1))+(2+4+6+\dots + 2n)$$ We know that sum of first $n$ odd numbers is $n^2$ and sum of first $n$ even numbers is $n(n+1)$. So our expression breaks down to $n^2+n(n+1)$ Which is then equal to $n^2+n^2+n=2n^2+n$. But the sum of first $n$ numbers is $\frac{n(n+1)}{2}$ and $2n^2+n$ is not equal to it. Even if I factorize $2n^2+n$, I get $n(2n+1)$ And, if I equate it to $\frac{n(n+1)}{2}$, I get $n=\frac{-1}{3}$ which is not what I want. What I want to ask is that why Sum of first $n$ odd numbers and Sum of first $n$ even numbers does not help us to get the Sum of first $n$ numbers.

Thanks in advance

3

There are 3 best solutions below

3
On BEST ANSWER

As Mark Bennet says, you are summing $2n$ numbers, not $n$ numbers.

To see why, you used $$(1 + 3 + 5 + \cdots + (2n - 1)) + (2 + 4 + 6 + \cdots + 2n).$$ Notice that the second part of the expression, $(2 + 4 + 6 + \cdots + 2n)$ in particular, is equal to twice the sum of the first $n$ numbers. This is because $$2 + 4 + 6 + \cdots + (2n - 2) + 2n$$ $$2(1) + 2(2) + 2(3) + \cdots + 2(n - 1) + 2(n)$$ $$2(1 + 2 + 3 + \cdots + (n - 1) + n)$$


For you to get the sum of the first $n$ numbers using the formula for odd and even numbers, you have to consider the case where $n$ is odd and $n$ is even. When $n$ is even, then $n$ can be represented as $2k$ where $k \in \mathbb{N}$. Then, there must be $k$ even numbers and $k$ odd numbers. Otherwise, there must be $k + 1$ odd numbers and $k$ even numbers.

To avoid confusion, we'll use $i$ as our variable here.

We know that $$1 + 3 + 5 + \cdots + (2i - 3) + (2i - 1) = i^{2}$$ and $$2 + 4 + 6 + \cdots + (2i - 2) + 2i = i(i + 1).$$

  • Case I: The number of terms is even.

Let $n$ be the number of terms. This means that $n = 2k$ where $k \in \mathbb{N}$. Hence, we have $k$ even numbers and $k$ odd numbers. Getting the sum of $k$ even numbers and $k$ odd numbers, $$2 + 4 + 6 + \cdots + 2k = k(k + 1) \\ 1 + 3 + 5 + \cdots + 2k - 1 = k^{2}$$

Adding both the sums, $$k(k + 1) + k^{2} \\ k^{2} + k + k^{2} \\ 2k^{2} + k \\ k(2k + 1) \\ \frac{n}{2}(n + 1) \\ \frac{n(n + 1)}{2}$$

  • Case II: The number of terms is even.

To solve this case, we will use the first case, and just add $2k + 1$. Hence, we have $n + 1$ terms. Then, $$k(k + 1) + k^{2} + 2k + 1 \\ k^{2} + k + k^{2} + 2k + 1 \\ 2k^{2} + 3k + 1 \\ (2k + 1)(k + 1) \\ (n + 1)\left(\frac{n}{2} + 1\right) \\ (n + 1)\left(\frac{n + 2}{2}\right) \\ \frac{(n + 1)(n + 2)}{2}$$

Our last expression seems to match the formula from the first case, only that $n$ became $n + 1$.

0
On

In order to find the proof you are searching for you need to emply a trick. As a hint, note that

$$(n+1)^2 - n^2 = 2n + 1$$

1
On

I think that n in the first n numbers and n in the first odd n numbers are not the same. For example sequence 1,2,3,4 contains 4 first numbers and only 2 even or odd - 2 times less. With this in mind, your answer correct - n(2n+1)=2n(2n+1)/2=N(N+1)/2, where N is all numbers and n is only even or odd.