collatz and sorting