checks smallest positive number divisible by all numbers from 0 to x