## Invitation to Computer Science 8th Edition

The formula is $n \cdot(n+1)$ --- Once again we arrange the terms of our expression $2+4+6+\ldots+2 \cdot n$ into pairs. The number of pairs in this case is $n .$ $2+2 \cdot n=2 \cdot(n+1)$ $4+(2 \cdot n-2)=2 \cdot(n+1)$ $6+(2 \cdot n-4)=2 \cdot(n+1)$ . . . 2. $n+2=2 \cdot(n+1)$ The total sum $n \cdot 2 \cdot(n+1)$ is twice the sum we are looking for. Dividing by two will lead us to the final formula $\frac{n \cdot 2 \cdot(n+1)}{2}=n \cdot(n+1)$