Problem 61 solved using recursive solution.