Increment is the wrong word. They implemented the Luhn algorithm, which is not the same as i++
Luhn is just a check digit, so you could define an increment function that adds one to the base number and then calculates the last digit. Or, you could just iterate over every possible check digit from 0-9.