Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence...

Problem

Solution