|
Post by Foundation on Jan 11, 2021 0:18:55 GMT
Is there any formula to guess the number of items in a triangle, by only knowing the number of items at its base?
|
|
|
Post by Deleted on Jan 11, 2021 2:01:08 GMT
Probably.
|
|
|
Post by John Skieswanne on Jan 11, 2021 14:18:33 GMT
The challenge with triangular numbers is that the next triangle is the sum of the last triangle... Plus the number of items at one of the sides of the triangle... Plus one.
So computing a very large triangular number seems confusing.
But when you think about it, mathematically-wise, the items don't have to be arranged as a perfect triangle.
In fact if you would imagine the items arranged in a square triangle instead, you would notice something: all triangular numbers look like half a perfect square:
Smallest triangular number (base=1):
*
Second triangular number (base=2):
** *
Third triangular number (base=3):
*** ** *
Fourth triangular number (base=4):
**** *** ** *
And so on. So, suddenly, we have obtained a clue as to how to solve the problem.
Now obviously the base number (number of items at the base) is crucial. But let's take, for example, the third triangle (base=3). If we simply make a square of items that's 3x3, we obtain nine items. Half that square would be 4.5 items, which is not the solution, as the triangle is observed to have 6 items.
The secret is to add one more row to the square, so that it becomes a rectangle.
So, sticking with the base=3 example, we make a rectangle 3 items sides, but 4 items long.
*** *** *** ***
Cutting this rectangle in half, we obtain 6 items!
*** ** *
Which is precisely the number of items in the base=3 triangular number!
A formula can therefore be derived: the number N of items of ANY triangular number will be equal to (B(B+1))/2, where B is the number of items at its base.
So, in our example, this formula would read, N = (3(3+1))/2 = 6.
|
|
|
Post by Deleted on Jan 12, 2021 0:11:33 GMT
I knew there was a formula! What a good bayesian I am.
|
|