This problem was given out at the 2008 Santa Clara Valley Mathematics Field Day competition.

A triangular number, Tn = 1+2+3+ ... + n. There are some triangular numbers which are the products of three consecutive positive integers. For example, T3 = 1+2+3 = 1*2*3. Also, T22736 = 1+2+3+...+22736 = 636*637*638 = 258474216. NOTE: 258474216 is the largest of these numbers.

It turns out that there are exactly six triangular numbers which are the products of three integers.

Write a program that fills in the following table where TFTN# represents the index of the "Three Factors of Triangular Numbers." They are labeled A through F since they don't correspond to the indexes you will need to get the sums and products.

Your function should return a list containing six lists of three elements. It should be of the form: ((3 1 6) ... (22736 636 258474216)) where the first number in each triplet is the n in 1+2+...+n, the second number is the FIRST number in x(x+1)(x+2), and the last number is the triangular number.

The Three Factors   Triangular Number   Notation
TFTN# 1st 2nd 3rd          
A
1
2
3
Π=
6
=
T
3
B
Π=
C
Π=
D
Π=
E
Π=
F
636
637
638
Π=
258474216
=
T
22736