The first element of a Syracuse sequence is a positive integer s0. The value si (for i > 0) is defined to be si−1/2 if si−1is even, or 3si−1+ 1 if si−1is odd. The sequence is finished when a 1 is encountered. Write a procedure to print the Syracuse sequence for any integer s0. (It is not immediately obvious that this method should always terminate.)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here