# the gauss's approach to find the following

1+2+3+4+... 99
1+3+5+7+...101

## try 1 to 5

1 + 2 + 3 + 4 + 5 = 15
that is five numbers
the middle one is 3 which is (1+5)/2

so try 1 to 99
that is 99 numbers
the middle one is (1+99)/2 = 50
so try 99*50 =100*50 - 99 = 4901
================================
try
1+3+5 = 9
which is 3 (1+5)/2 = 3*3
try
1+3+5+7 = 16
= (8/2)(8/2) = 16
try
1+3+5+7+9 = 25
=(10/2)(10/2)
try
1+3+5+7+9+11 = 36
= (12/2)(12/2)
so try
middle = 102/2 and number of them = 102/2
102^2/4 = 2601

## To find the sum of the series 1+2+3+4+...+99, you can use the formula for the sum of an arithmetic series:

Sum = [(first term + last term) * number of terms] / 2

In this case, the first term is 1, the last term is 99, and the number of terms is 99. Plugging this into the formula, we get:

Sum = [(1 + 99) * 99] / 2 = 4950

So, the sum of the series 1+2+3+4+...+99 is 4950.

To find the sum of the series 1+3+5+7+...+101, you can also use the formula for the sum of an arithmetic series. However, in this case, the common difference between terms is 2 (each subsequent term is 2 more than the previous term).

First, we need to determine the number of terms. The last term, 101, can be found using the formula for the nth term of an arithmetic series:

nth term = first term + (n-1) * common difference

Plugging in the values, we get:

101 = 1 + (n-1) * 2
101 = 1 + 2n - 2
101 = 2n - 1
2n = 102
n = 51

So, there are 51 terms in the series.

Now, we can calculate the sum using the formula:

Sum = [(first term + last term) * number of terms] / 2

In this case, the first term is 1, the last term is 101, and the number of terms is 51. Plugging this into the formula, we get:

Sum = [(1 + 101) * 51] / 2 = 2601

Therefore, the sum of the series 1+3+5+7+...+101 is 2601.