project euler #5 with factored-out modules