Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ ugly_numbers.py
File
ugly_numbers.py
maths/special_numbers/ugly_numbers.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"
2
Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence
3
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … shows the first 11 ugly numbers. By convention,
4
1 is included.
Callers
nothing calls this directly
Calls
1
ugly_numbers
Function · 0.85
Tested by
no test coverage detected