Previous Commit
The previous commit actually fixed the problem that the code was not
producing the correct result. The code was designed to have the for loop
initialized to 2 instead of 1 and this was causing issues in the code.