Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Science, Math, and Philosophy
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2007, 12:59 AM
stanek stanek is offline
Member
 
Join Date: Apr 2006
Posts: 73
Default Numbers in a Triangle: Curious Question

Assume we arrange numbers in a triage like this,
<font class="small">Code:</font><hr /><pre>
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
...
</pre><hr />

Is it possible to create a formula(s) to find where X lies in the triangle? ie x=9 is row 4 position 3(or 5)

I am curious as to how this is done. Ive searched google for numbered triangles and all that I can find is Pascals triangle, which isn't the same thing.

Is there a name for numbers arranged this way?

Right now I think that finding the row would be a function involving the square root and the column(positon) a mod function.

Any help in the right direction to figuring this out would be appreciated. Thanks
Reply With Quote
  #2  
Old 07-30-2007, 01:41 AM
jay_shark jay_shark is offline
Senior Member
 
Join Date: Sep 2006
Posts: 2,277
Default Re: Numbers in a Triangle: Curious Question

All the triangular numbers are easy to work with .
1=1*2/2 is in the first position , first row
3=3*2/2 is in the second position ,second row
6=4*3/2 is in the third position , third row
10=5*4/2 is in the fourth position , fourth row .

Notice that
2c2+2 =3c2
3c2+3 =4c2
4c2+4 =5c2
5c2+5 =6c2
Now every number in between two successive triangular numbers can be identified relatively easy using Mod Arithmetic . The position of a number in a row becomes the remainder if we can identify the two successive triangular numbers .

Take 151 . Multiply this number by 2 and take the square root of it . Now take the least integer value which is 17 and add 1 to it which should tell you what row this number is in .
17*16/2 = 136 and so 151-136 =15 tells you the position of that number along the row . Here is the formula or generalization which computes the row first and then the position along the row .

([sqrt(2x)] + 1 , x- [sqrt(2x)]*([sqrt(2x)]-1)/2 )
Reply With Quote
  #3  
Old 07-30-2007, 02:01 AM
stanek stanek is offline
Member
 
Join Date: Apr 2006
Posts: 73
Default Re: Numbers in a Triangle: Curious Question

Awesome! Thanks for the extra insight into the combination stuff, I'll look into it also.

I thought it was easy but I couldn't quite figure it myself. I was close though.

Thanks for answering everything and then some.
Reply With Quote
  #4  
Old 07-30-2007, 02:28 AM
jay_shark jay_shark is offline
Senior Member
 
Join Date: Sep 2006
Posts: 2,277
Default Re: Numbers in a Triangle: Curious Question

Let me also clarify that you should take the greatest integer value if the number is closest to the first integer greater than x . Otherwise you use the least integer value function which is the greatest integer less than the value x .

Or, just round the number to the closest positive integer .

[sqrt(11*2)]=5 which is the 5th row .
[sqrt(10*2)] =4 which is the 4th row .
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.