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 :

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

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)?

  Submitted by Lewis    
Rating: 3.0000 (6 votes)
Solution: (Hide)
Call the random positive integer that you were told X.

To work out if X is a triangle number, you do the sum (x*8)+1. If the result is a square number, then X is a triangle number.

For example, 6*8 is 48. Add 1 to get 49. Because 49 is a perfect square (49 = 7^2) then 6 is a triangle number.

8*8 is 64. Add 1 to get 65. Because 65 is not a perfect square then 8 is not a triangle number.

Also, when you have done (x*8)+1, if it does equal a square it will equal the square of an odd number.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionPuzzle Solution: Method IIK Sengupta2008-05-08 14:26:03
SolutionPuzzle Solution: Method IK Sengupta2008-05-08 14:24:36
SolutionQuadraticAdam Sisco2003-08-11 02:40:29
SolutionSimpler DerivationDJ2003-08-07 21:25:56
No SubjectLynetteVivian2003-08-07 20:36:17
SolutionAnother simple methodGamer2003-08-07 18:32:32
No SubjectLynetteVivian2003-08-07 17:53:57
re: Simple MethodBrian Wainscott2003-08-07 16:48:37
SolutionSimple MethodDJ2003-08-07 15:27:26
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information