These are the only sets of triangular numbers that work:
3 * 6 * 21 = 378
3 * 10 * 21 = 630
3 * 6 * 55 = 990
Only 10 and 55 are unique to being a factor of one particular 3-digit triangular, and so the solutions containing these factors must be Tom's and Harry's, so Dick's is 3*6*21 = 378.
DEFDBL A-Z
DIM tri(44)
first3 = 14
FOR i = 1 TO 44
PRINT i; i * (i + 1) / 2
tri(i) = i * (i + 1) / 2
NEXT
FOR i = first3 TO 44
lim = INT(tri(i) ^ (1 / 3) + .00001)
sub1 = 2
DO
remains = tri(i) / tri(sub1)
IF remains = INT(remains) THEN
sub2 = sub1
DO
remains2 = remains / tri(sub2)
IF remains2 = INT(remains2) THEN
FOR j = 2 TO first3
IF tri(j) = remains2 THEN
PRINT tri(sub1); tri(sub2); tri(j), tri(i)
END IF
NEXT
END IF
sub2 = sub2 + 1
LOOP UNTIL tri(sub2) > INT(SQR(remains) + .5)
END IF
sub1 = sub1 + 1
LOOP UNTIL tri(sub1) > lim
NEXT
Adapted from Enigma No. 1434 by Richard England, New Scientist 17 March 2007. |