Confirmed that the algorithm finds Keith numbers correctly.