Hello everyone. Can you please help me on this certain problem?
A mathematician named Ulam proposed generating a sequence of numbers
from any positive integer number as follows:
If n is 1, stop
If n is even, replace it with n / 2
If n is odd, replace it with 3 * n + 1
Write a program to generate Ulam sequence of positive
integers. Include an option to repeat the process.
Sample Run: