All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers > Sequences
Triangle Numbers (Posted on 2003-08-07) Difficulty: 3 of 5
Triangle numbers are :


Somebody tells you a random positive integer of any size. Is there a quick way to work out if it is a triangle number or not (in other words, without going through all of the triangle numbers untill you get to a number as high or higher as the integer you've been told)?

See The Solution Submitted by Lewis    
Rating: 3.0000 (6 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Puzzle Solution: Method II Comment 9 of 9 |
(In reply to Puzzle Solution: Method I by K Sengupta)

Let the random positive integer be P.

If P is a triangle number, then by definition P = m(m+1)/2, for some positive integer m.

Then, 2*P = m(m+1) = m^2 + m

But for any positive integer m, we must have:

m^2 < m^2 + m < (m+1)^2

Thus, if V(2*P) lies between two consecutive integers and if by multiplying these consecutive positive integers and dividing by 2, we get P then we will know for certain that P is a triangular number.

Edited on May 8, 2008, 3:37 pm
  Posted by K Sengupta on 2008-05-08 14:26:03

Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information