### Brain Teasers

# Number Trick...

Professor X has managed to create a simple program that can multiply any two whole numbers and calculate the answer correctly.

But, a problem has arisen....it seems the program will NOT correctly multiply a number by itself (such as 4 X 4).

Fortunately, the professor knows a way to get around this glitch.

Keeping in mind that the program must accept ANY whole integer, do you know a way to have the program multiply the numbers in a different way to get the correct result?

This method only has to work when multiplying a number by itself.

But, a problem has arisen....it seems the program will NOT correctly multiply a number by itself (such as 4 X 4).

Fortunately, the professor knows a way to get around this glitch.

Keeping in mind that the program must accept ANY whole integer, do you know a way to have the program multiply the numbers in a different way to get the correct result?

This method only has to work when multiplying a number by itself.

### Answer

Here's a neat trick to calculate any given number multiplied by itself:Take one less than the given number and multiply it by one greater than the given number and add 1.

For example:

25 X 25 = 625

24 X 26 = 624 + 1 = 625

It also works for negative numbers:

-1 X -1 = 1

-2 X 0 + 1 = 1

The mathematical formula that the professor should use would be:

(n = given integer)

(n + 1) X (n - 1) + 1

This would be equivalent to n X n.

Hide Answer Show Answer

## What Next?

View a Similar Brain Teaser...

If you become a registered user you can vote on this brain teaser, keep track of which ones you have seen, and even make your own.

### Solve a Puzzle

Comments hidden to avoid spoilers.

## Follow Braingle!