TRIANGULAR NUMBERS
Find the 50th triangular number. The first four triangular
numbers are T1=1, T2=3, T3=6,
and T4=10.
T1 = 1 = 1
T2 = 1 + 2 = 3
T3 = 1 + 2 + 3 = 6
T4 = 1 + 2 + 3 + 4 = 10
T5 = 1 + 2 + 3 + 4 + 5 = 15
Tn = 1 + 2 + ... + (n-2) + (n-1) + n = ?
Realizing that Tn is defined by the sum of natural numbers from 1 to n was the primary step in solving this problem. It did not take me too long to see this, so I can't really find a more intuitive solution step prior to this one. This pattern lends itself very easily to a recursive formula, since each new triangular number is merely the previous triangular number plus the new term, or in a simpler symbolic expression: Tn = Tn-1 + n.
Unfortunately, this pattern and idea is useless to us for finding
the 50th triangular number unless we know the 49th triangular
number. At the most primitive level, we can solve this problem
by summing the numbers from 1 to 50 (on calculator).
=
1275. This was VERY annoying to do. It took me multiple times
to get the same sum twice (i.e. to verify that I had done it correctly).
At this point, the first thing that comes to mind is one of
the methods of summation learned in the Lion problem. Specifically,
add the terms successively from opposite ends of the sequence
so that you get the same sum with each addition. In the Lion
problem, the sum always equaled n-1, BUT the summation went from
1 to n-2. This time, the summation goes from 1 to n, and as we
will discover, the sum will equal n+1 for each pair.
The only remaining question, then, is exactly how many times
do we count the number 51? Here we must consider the two cases
where n is an odd or even number.
If n is odd:
1 + 2 + . . . + (
-1) +
+ (
+1) + (
+2) .
. . + (n-1) + n
Above you can see that you keep adding pairs until you get to
the n/2 term. In other words, when n is odd, you add n+1, n/2
times. Or:
= (n+1)(n/2).
If n is even, the sequence looks slightly different:
1 + 2 + . . . + (
-1) +
+
+ (
+1) + (
+2) + . . . + (n-1) + n
Here, observe that we can only sum pairs to the (n-1)/2 term,
and then there is an extra term, (n+1)/2 to be added to the sum.
So:
= (n+1)[(n-1)/2] + (n+1)/2.
Now, the only question is: Does (n+1)(n/2) = (n+1)[(n-1)/2] + (n+1)/2 ?
Observe,
(n+1)[(n-1)/2] + (n+1)/2 =
[(n+1)(n-1)]/2 + (n+1)/2 =
[(n+1)(n-1) + (n+1)]/2 =
[(n+1)(n-1+1)]/2 =
[(n+1)n]/2 =
(n+1)(n/2).
So, our closed formula is, in all cases, Tn = (n+1)(n/2)
Someone else in the class came up with a very interesting alternative
way to find (visualize) the recursive formula. Consider,
If Tn is visualized as a figure n2, then
Tn = n2 - Tn-1 . The
interesting question here is: How does n2 - Tn-1
= Tn-1 + n ? Observe:
Tn = n2 - Tn-1 Tn = Tn-1 + n
Tn + Tn-1 - n2 = 0 Tn-1 + n -Tn = 0
Tn +Tn-1 - n2 = Tn-1 + n - Tn
2Tn - n2 -n = 0
2Tn = n2 + n
2Tn = n(n+1)
Tn = n(n+1)/2.
SUMMARY OF SOLUTIONS:
Numerical Solution
T50 = 1275
Recursive Formula
Tn = Tn-1 + n
Closed Formula
Tn = (n+1)n/2