Question: Try performing the 3n + 1 algorithm given in Example for n = 3, n = 4, n = 7, n = 8, and n = 13. How many iterations are required for each of these numbers? Do any of the sequences generated appear within any of the others (and if so, which)?
Example: (the 3n+1 algorithm). Check this algorithm out. The input is some n ∈ N.
1. If n is odd, replace n with 3n+1; otherwise, replace n with n/2.
2. If n = 1, output n; otherwise, go to step 1.