Collatz

Calculate the length of the Collatz sequence for a given number

Crates.io DeepSource

Usage

collatz(n) returns the length of the Collatz sequence for n.