2

I saw this from Project Euler, problem #1:

If we now also note that $ 1+2+3+\cdots+p = {(1/2)} \cdot p\cdot(p+1) $

What is the intuitive explanation for this? How would I go about deriving the latter from the former? It has the summation express which I am not sure how to deal with, so unfortunately I am not even sure how I would begin to show these are equivalent.

  • 1
    Pair 1 with $p$, 2 with $p-1$, 3 with $p-2$, and so on. Also known as "the Gauss trick". – Gerry Myerson May 06 '14 at 07:50
  • 1
    If you look at the first 5 numbers $$ 1 + 2 + 3 + 4 + 5 \ 5 + 4 + 3 + 2 + 1 \ 6 + 6 + 6 + 6 + 6 $$ Then we see that we get $6 \cdot 5 = 30$ but now we have counted each number twice. To get the correct answer we now divide by two. You can extend this to $p$ numbers as well. For a different proof see

    http://math.stackexchange.com/questions/292423/proving-the-sum-of-the-first-n-natural-numbers-by-induction

    – N3buchadnezzar May 06 '14 at 07:51
  • Within $4$ minutes this question has $4$ comments and $5$ or $6$ answers. Mathematicians adore this. I think that for quite some of them it was one of the first encounters with the beauty of mathematics. – drhab May 06 '14 at 07:58

6 Answers6

2

$\begin{array}{cccccc} 1 & 2 & \cdots & p-1 & p\\ p & p-1 &\cdots & 2 & 1\\ -- & -- & -- & -- & -- & +\\ p+1 & p+1 &\cdots & p+1 & p+1\end{array}$

Counting twice you get: $p\times\left(p+1\right)$

So counting once you get: $\frac{1}{2}\times p\times\left(p+1\right)$

drhab
  • 151,093
2

Gauss first came up with a sleek way to do it: he grouped the $1$st term and the last term:

$1 + p$, and then the $2$nd term $2$ and the second to last term $p-1$, and so on until he

reached the middle terms. He found that all the groups have the same sum: $p+1$, and there

were a total of $\dfrac{p}{2}$ groups. So the answer is what you got.

DeepSea
  • 77,651
2

There’s a nice way to see this which allegedly comes from Gauss: his teacher asked the class to sum the numbers from $1$ to $100$, and Gauss found a neat trick.

Write $S_p$ for the sum $1 + 2 + \cdots + p$. If we write it out once, and then again in reverse: $$ \begin{align*} S_p &= 1 + \;\;\;\,2\;\;\;\; + \cdots + p \\ S_p &= p + (p-1) + \cdots + 1 \end{align*} $$ then we see there’s a nice way to pair up terms: $$S_p + S_p = 2S_p = (p+1) + (p+1) + \cdots + (p+1) = p\,(p+1)$$ We can then divide by $2$ to get the result: $$S_p = \tfrac{1}{2}p\,(p+1)$$

alexwlchan
  • 2,060
2

Let,
\begin{equation} S=1+2+3+\cdots+(p-1) + p \ \tag{1} \label{1} \end{equation} also, S can be rewritten as,
\begin{equation} S=p+(p-1)+(p-2)+\cdots + 2 +1\ \tag{2} \label{2} \end{equation} The total number of terms in $S = p$, because these are first p natural numbers. See my spacing between + signs in the above two expressions, if we pair $i^{th}$ element of the \eqref{1} and \eqref{2} and add them, we will get, $$2S=(p+1)+(p+1)+(p+1)+ \cdots+ (p+1) \space\space\space\space\space\space\space\space\space\space\space\space\space\cdots\space\space\space\space \text{upto p times}$$ Since multiplication is repetitive addition, hence $$2S=p(p+1)\tag{3}\label{3}$$ From \eqref{1} and \eqref{3} $$\Rightarrow S=\frac{(p(p+1))}{2} = S =1+2+3+...(p-1)+p $$

DSinghvi
  • 565
0

Proof without words in Wolfram Demonstrations Project:

http://demonstrations.wolfram.com/ProofWithoutWords12N1NChoose2/.

0

Alternatively, you can think of it like this

.
. .
. . .
. . . .
<etc...>
. . . . . . . . <etc...> . (n dots here)

For example, when $n = 6$, we have

. 
. .
. . .
. . . .
. . . . .
. . . . . .

Now, note that the ith row contains i dots, so the total number of dots is equal to $1 + 2 + ... + n$. (in this case, n = 6) Now, the area of the right triangle is $\frac{n(n + 1)}{2}$. This gives us the answer.

Alternatively, you can prove this by induction.

zscoder
  • 1,043