Complete & Tested fair-and-square. Uses memoization, algorithm cannot process large-data range 10^14