MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / sol2.py

File sol2.py

project_euler/problem_14/sol2.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1def collatz_sequence(n):
2 """Collatz conjecture: start with any positive integer n.Next termis obtained from the previous term as follows:
3 if the previous term is even, the next term is one half the previous term.
4 If the previous term is odd, the next term is 3 times the previous term plus 1.

Callers

nothing calls this directly

Calls 1

collatz_sequenceFunction · 0.85

Tested by

no test coverage detected