Modify the program that computes the Collatz function given in the solution to Exercise 2.3.29 to use Java’s BigInteger class, so that it can perform its computation using integers of arbitrary length.
Exercise 2.3.29
Collatz function. Consider the following recursive function, which is related to a famous unsolved problem in number theory, known as the Collatz problem, or the 3n+1 problem:
For example, a call to collatz(7) prints the sequence
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here