How does sum of first $k$ integers equal $k(k+1)/2$ According to this video, he explains 
$$p = k(k+1) / 2$$
Where $p$ is the sum of the first $k$ natural numbers. I understand $k$ means times of repetition and $k+1$ is how it increments, but why does he divide by $2$? I can't justify it.



Here is what the video describes:

for (i = 1; i &lt;= n; i++)
  p += i


$$\begin{array}{|c|c|}
\hline i &amp; p \\
\hline 1 &amp; 1 \\
\hline 2 &amp; 3 \\
\hline 3 &amp; 6 \\
\hline 4 &amp; 10 \\
\hline \vdots &amp; \vdots \\
\hline i &amp; i(i+1)/2 \\
\hline 
\end{array}$$
Let me tell you the story of young Carl Friedrich Gauss. 

He was six years old and in a small school with one class for everyone from 6 to 16. His teacher needed some quiet time for some job, so he asked the kids to add up the numbers 1 to 1000.

30 seconds later young Carl Friedrich had the answer: 500,500. 

How did he do it?

He changed the order and added 1+1000, 2+999, 3+998 up to 500+501. Each sum is 1001, and there are 500 sums, so the result is 1001 * 500. Obviously k=1000, so this is (k+1) * k / 2. 

You can use this for adding numbers in any arithmetic progression: sum = (first + last) * count / 2.