Hi, can anyone help me reverse the Triangle Number algorithm please? The Triangle Number algorithm is A1*(A1+1)/2. This returns a cumulative result of 1, 3, 6, 10, 15, 21, etc...
I need to reverse this... I have the number 21 and need to get the number 6 out of it (without a long string of if-then statements of course). Obviously the easiest way is to make it a Square Number first (and get the square root), so have to make that 21 a 36 first with the same algorithm that makes the 15 into a 25. At least, that seems the most obvious way... :/
Bookmarks