Write a program that determines and prints which number up to 1 million produces the longest Collatz sequence and what its length is.
Write a program that determines and prints which number up to 1 million produces the longest Collatz sequence and what its length is.