AMC8 2020 Problem 22

When a positive integer N is fed into a machine, the output is a number calculated according to the rule shown below:

N \mapsto \begin{cases} N^2 & \text{if } N \text{ is even} \\ 3N + 1 & \text{if } N \text{ is odd} \end{cases}

For example, starting with an input of N = 7, the machine will output

3 \cdot 7 + 1 = 22.

Then if the output is repeatedly inserted into the machine five more times, the final output is 26:

7 \to 22 \to 11 \to 34 \to 17 \to 52 \to 26.

When the same 6-step process is applied to a different starting value of N, the final output is 1. What is the sum of all such integers N?

N \to \text{__} \to \text{__} \to \text{__} \to \text{__} \to \text{__} \to 1

Answer Choices
A. 73
B. 74
C. 75
D. 82
E. 83