attempted problem 12 and it seems i have to refine my algorithm to take
into account finding divisors m and n/m and the like