Beruflich Dokumente
Kultur Dokumente
Trying Triangulars
What is the largest positive integer that cannot be expressed as the sum of distinct triangular
numbers?
Solution
By individually checking and noting down which numbers are not expressible as the sum of
triangular numbers, we will generate the set of numbers S {2,5,8,12, 23,33} . Above this,
we will cease to find results. This suggests that 33 is our answer, but just checking numbers
is obviously not enough; we must find a proof.
Proof by induction:
Let P(n) be the proposition: With the exception of integers in the set S {2,5,8,12, 23,33} ,
2
every positive integer up to and including n is expressible as the sum of distinct triangular
numbers.
To verify that 33 is the largest positive integer that cannot be expressed as the sum of
distinct triangular numbers, we must prove this proposition to be true for all n .
We should begin by verifying that P(n) is true for every natural number up to and including
49 .
To use induction, we inspect P(n 1) . We now examine the general integer m such that
n2 m (n 1) 2 . This is the range of integers which are proposed by P(n 1) , but which
have not already been assumed by P(n) .
JS 23/01/13 © MEI
1 of 4
The above diagram shows where the range of m comes from (the blue line shows the range
of integers proposed by P(n) , whilst the red line shows those proposed by P(n 1) ).
If we can show, using the assumption that P(n) is true, that all possible values of m can be
expressed as the sum of triangular numbers, then we will have shown that “ P(n) is true
implies P(n 1) is true” for all n 7.
(n 1)n n(n 1)
1. n2 n 1 n
2 2
(n 2)(n 1) (n 1)(n 2)
2. n2 2 n 2 n 1 2
2 2
th r (r 1)
(These are derived from the fact that the r triangular number can be written as r .)
2
Case I: k S
So m is made up of two triangular numbers and a third number, k . We need to show that k
can be expressed as a sum of distinct triangular numbers, exclusive of n 1 and n .
Substituting for m , k n2 (n 1) 2
Rearranging, k (n 1) 2 n2
Simplifying, k 2n 1
(n 1)n
Using triangular number formula, 2n 1
2
JS 23/01/13 © MEI
2 of 4
Expand and multiply by 2, 4n 2 n2 n
Rearrange, n2 5n 2 0
5 33
Complete the square, n
2
5 33
So 2n 1 n 1 is true for all n 5.37 . As n 7 , this will always be true, giving
2
k n 1 .
or n .
Case II: k S
If we examine S , we can see that every element can be written as r 2 , except for 2
(which is 0 2 ) and 33 (which can be written as 7 2 2 ).
1. k 2 0
2. k 2 r (where r and 2 r 6| r 5)
3. k 2 7 2
In the first sub-case, m n 2 n 1 and can therefore be expressed as the sum of distinct
triangular numbers.
For the second sub-case, we need to show that k 2 n 2 . As shown in Case I above,
k 2n 1 , so it follows that k 2 2n 1. Now we examine the inequality; 2n 1 n 2 .
JS 23/01/13 © MEI
3 of 4
(n 2)(n 1)
Using triangular number formula, 2n 1
2
Rearrange, n2 7n 4 0
7 33
Complete the square, n 6.37
2
7 33
So k 2 n 2 is true for all n 6.37 . As we have defined n to be greater than or
2
equal to 7 , this will always be the case.
Therefore, for this sub-case, k 2 will always be a triangular number smaller than n 2 , and
m can therefore be expressed as a sum of distinct triangular numbers.
So we have shown that any possible value of m can be expressed as the sum of distinct
triangular numbers. There, for n 7 , P(n) is true implies P(n 1) is true.
So, by induction, P(n) is true for all n , and the largest integer that cannot be expressed
as the sum of distinct triangular numbers is 33 .
JS 23/01/13 © MEI
4 of 4