optimized
fixed double counting common multiples - correct solution; more optimization