identifies divisors in set and initial smallest solution before loop