Add Collatz sequence procedure