Finding all factors of a number