### Brain Teasers

# Triangle Numbers

Triangle numbers are formed by adding successive integers, i.e.

1 = 1+0,

3 = 1+2,

6 = 1+2+3,

10 = 1+2+3+4,

etc.

So the first few triangle numbers would be:

1,3,6,10,15,21,28, ...

Suppose somebody tells you a random integer. How can you quickly find out whether or not it is a triangle number?

1 = 1+0,

3 = 1+2,

6 = 1+2+3,

10 = 1+2+3+4,

etc.

So the first few triangle numbers would be:

1,3,6,10,15,21,28, ...

Suppose somebody tells you a random integer. How can you quickly find out whether or not it is a triangle number?

### Hint

The method is linked to another common series.### Answer

Multiply the number by 8 then add 1. If the result is a perfect square, then the original number is a triangle number.For example: 10*8+1 = 81. 81 = 9^2. So 10 is a triangle number.

11*8+1 = 89. 89 is not a perfect square, so 11 is not a triangle number.

Hide Hint Show Hint Hide Answer Show Answer

## What Next?

View a Similar Brain Teaser...

Or, get a random brain teaser.

Or, get a random 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.

## Comments

Cool teaser! Here is another way. Double it. find the square root (approx) and round up and down to consecutive integers. If they give the double, it is triangular. Example 15 doubled is 30. Since it lies between 25 and 36 is square root is about 5.5. Rounding up and down make 5 and 6. 5x6 = 30 Yes!

Nice method jimbo! - but I think my one's a little less complicated...

I'm scratching my head as to why the given solution works? Good mind itch though. I had to look at the answer.

Jan 18, 2005

I don't get it!

Jan 18, 2005

I don't get it!

Wait...

A triangular number is of the form (n^2+n)/2 where n is an integer.

4n^2+4n+1 is that times 8 and then plus one which can be factored out to be (2n+1)^2

The square root of that is 2n+1 and is an integer as long as n is an integer or half an integer. Now if n is something like 1.5, (n^2+n)/2 will not be an integer. Therefore, your method works.

Good one!

A triangular number is of the form (n^2+n)/2 where n is an integer.

4n^2+4n+1 is that times 8 and then plus one which can be factored out to be (2n+1)^2

The square root of that is 2n+1 and is an integer as long as n is an integer or half an integer. Now if n is something like 1.5, (n^2+n)/2 will not be an integer. Therefore, your method works.

Good one!

is there any particular mathematical reasont hat works out, or is it just a rnadom quirk of mathematics that applies?

(also, once into bigger numbers, that method wont be so quick, trying to figure out perfect square and what not, but this is interestingly related to partial sum formula, because thats what triangle numbers are, sum of all integers from 1 to X. so for any number x, Sum = (x/2)*(2+(x-1)) for example, x=10, sum = 5*(2+9) = 55, t'works. dont bother trying to figure out the summation formula, I am telling you it works

(also, once into bigger numbers, that method wont be so quick, trying to figure out perfect square and what not, but this is interestingly related to partial sum formula, because thats what triangle numbers are, sum of all integers from 1 to X. so for any number x, Sum = (x/2)*(2+(x-1)) for example, x=10, sum = 5*(2+9) = 55, t'works. dont bother trying to figure out the summation formula, I am telling you it works

Never heard it explained with the multiply it by 8, add 1 and take its square solution. Nice twist, and good teaser.

## Follow Braingle!