Does anyone have an algorithm for finding the factors of a number?