Prove that $\forall n \in N $ , $ \sum_{i=1}^n i = \frac{n(n+1)}{2}$, counting in two ways the number of shaded squares in the diagram Prove that $\forall n \in  N $ $$ \sum_{i=1}^n i = \frac{n(n+1)}{2}$$ counting in two ways  the number of shaded squares in the diagram.

I have been thinking about this, but I can't understand how prove it counting the shaded squares. Can i assume that $ 1+2+3+...+n $ is the number of shaded squares?
I can't see it clearly.
 A: The left-hand side sums over the numbers of shaded squares per row. The right-hand side is the number of shaded squares in an $n\times(n+1)$ rectangle; exactly half are shaded, by an order-$2$ rotational symmetry.
A: *

*$0$ shaded squares in the rightmost column.


*$1$ shaded square in the next column to the left.


*$2$ shaded squares in the next column to the left.


*$\vdots$


*$n$ shaded squares in the leftmost column.
Then use the rotational symmetry to conclude.
A: The diagram is illustrating $n=8$.
Counting shaded squares in successive rows, it's apparent that there are $1,2,3,4,5,6,7,8$ squares in the rows - not actually counting them, really, just observing that the amount increases by one each time. So there are $\sum_{i=1}^8 i$ shaded squares.
It's also apparent that there are the same number of unshaded squares - for example by observing the same pattern as above but from the bottom upwards.
This gives us that the total squares in the diagram is $2\sum_{i=1}^8 i$
However we can also easily see that the total number of squares is $8\times 9$ - the $8$ rows multiplied by the $8+1$ columns.
It's also clear that none of this is dependent on any special property of the number $8$ - it would work no matter what the limit was.
So we have a clear demonstration that  $$ 2\sum_{i=1}^n i = n(n+1)$$ and one algebraic step gives us the formula.
A: Here's an idea for you, which seems to explain the famous legend about how Gauss came up with a solution at his school:
Call the sum of all shaded squares $\;S\;$ , and we now count them in two ways:
(*) Number of shaded squares by row, from to to bottom:
$$\;S= 1 +2 +3+\ldots+n\;\;(*)$$
(**) And now let's count the number of shaded squares per column from left to right:
$$S=n+(n-1)+(n-2)+\ldots+2+1 \;\;(**)$$
Now put both sums above one over the other and sum them up column after column:
$$\begin{cases}S=1&+&2&+&3&+\ldots+&(n-1)&+&n\\{}\\
S=n&+&(n-1)&+&(n-2)&+\ldots+&2&+&1\\{}\\
--&--&--&--&--&--&--&--&--&--&--\\{}\\
2S=(n+1)&+&(n+1)&+&(n+1)&\ldots&(n+1)&+&(n+1)\end{cases}$$
You got, in fact, $\;2S=n(n+1)\;$ ...and now divide by two and we're done.
