A solution to the 1HaskellADay triangle-sum problem