Work in progress on Problem 17
Solve Problem 35