{ min = 1 max = 20 step = [2, 3, 5, 7, 11, 13, 17].reduce do |acc, el| acc * el end (step..(step * step)).step(step).detect do |i| (min..max).all? do |j| i % j == 0 end end }