Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TheAlgorithms/Python
/ collatz_sequence.py
File
collatz_sequence.py
maths/collatz_sequence.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
""
"
2
The Collatz conjecture is a famous unsolved problem in mathematics. Given a starting
3
positive integer, define the following sequence:
4
- If the current term n is even, then the next term is n/2.
Callers
nothing calls this directly
Calls
1
main
Function · 0.70
Tested by
no test coverage detected