Correct typos in the comments.
Work in progress.  The main method was incorrect; attempt at fixing.
Adding one really silly test.
Obvious mistake.
Another obvious mistake.
And yet another completely obvious mistake.
Corrected major fault: denoms is already sliced in the main loop.  Just copy it in the call.
Simplest example works now.
WIP Almost there.
WIP Still almost there.  Console log: 1. "Returning the right result." 2. "Got the right result.  x = 50 and i = 0."
Fixed silly, silly oversight from yesterday.