You hear your name and it should appear on the board – these are not necessarily the best memories of school. Fortunately, I survived the helpless guesswork in front of the class. But maybe you would solve the task on the board with flying colors?

It’s the squares of numbers 1 .^{2} up to 100^{2}. Find the sum of all even square numbers and subtract the sum of all odd square numbers.

What is the result of the calculation?

the result is 5050. This is exactly the sum of all numbers from 1 to 100.

Finding the solution is not particularly difficult when we have binomial formula

a^{2 }– B^{2} = (a – b) * (a + b)

use.

We rearrange the squares – in descending order of size – and add the corresponding sign in each case – that is, plus or minus:

Since adjacent numbers always differ from exactly 1, we can simply omit the expressions (100-99), (98-97) and so on. This greatly simplifies the calculation:

Total = 100 + 99 + 98 + 97 + … + 2 + 1

We don’t have to add the numbers from 1 to 100 in our heads, we use the trick with which the mathematician Carl Friedrich Gauss once impressed his teacher as a student. To do this, we simply rearrange the numbers into 50 pairs, totaling 101 for each pair:

## More Stories

## The Circle Mission Makes All Students Fail – How About You?

## Boeing’s Starliner is ready for a test flight to the International Space Station

## NASA image shows how aliens see a solar eclipse on Earth