Sum = 79*(79+1)/2 = 79*80/2 = 3160
The sum of the numbers given is 31. 1 + 2 + 4 + 8 + ... + 2n = 2n+1 - 1
The sum of -1 and -1 is -2.
5050
25
Sum = 79*(79+1)/2 = 79*80/2 = 3160
if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;
2
2
1+2+4 = 7
The sum of the numbers given is 31. 1 + 2 + 4 + 8 + ... + 2n = 2n+1 - 1
(xn+2-1)/(x2-1)
You add 1 plus another one and you get 2
The sum of -1 and -1 is -2.
3
3x2 + 2x + 3 + x2 + x + 1 = 4x 2+ 3x + 4
87