5050
303
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 the integers from 1 to 100 can be calculated using the formula for the sum of an arithmetic series: ( S_n = \frac{n(n + 1)}{2} ), where ( n ) is the last integer in the series. Here, ( n = 100 ), so the sum is ( S_{100} = \frac{100(100 + 1)}{2} = \frac{100 \times 101}{2} = 5050 ). Therefore, the sum of the integers from 1 to 100 is 5050.
The sum of -1 and -1 is -2.
1+2+3+4.....+100 = 101*50= 5050
303
Sum of numbers from 1 to 100:(1+100) + (2+99) + (3+98) + (4+97) + ... + (49+52) + (50+51) =50 pairs, each pair adds up to 101= (50 x 101)= 5,050
2*100 = 200 12*10 = 120 14*1 = 14 Sum = 334
You add the numbers in a loop. Here is an example in Java:int sum = 0;for (int i = 1; i
if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;
Sum = 79*(79+1)/2 = 79*80/2 = 3160
The sum of these composite numbers, including 100, is 3989.The sum of all numbers between 1 and 100 is 5,050. From this we need to subtract the sum of 1 plus all the prime numbers below 100. The sum of the primes is 1,060. Subtracting (1 + 1060) or 1,061 from 5,050 yields 3,989.
2
2
1+2+4 = 7
The sum of the numbers given is 31. 1 + 2 + 4 + 8 + ... + 2n = 2n+1 - 1