> A friend writes to say he bought a little box of midget matches, each > one inch in length. He found that he could arrange them all in the > form of a triangle whose area was just as many square inches as there > were matches. He then used up six of the matches, and found that with > the remainder he could again construct another triangle whose area was > just as many square inches as there were matches. And using another > six matches he could again do precisely the same. > > How many matches were there in the box originally? The number is less > than 40.
Running an exhaustive c program on my linux system shows: