Problem 3. A sequence of natural numbers starts with the number 6. Each subsequent term in the sequence is obtained by the following rule: if the term $a$ is an even number, then the next term is $\frac{1}{2} a$, and if the term $a$ is an odd number, then the next term in the sequence is $3 a+1$. What is the 2018th term? Explain your answer!
Solution. Let's write down the first members of the sequence. We have:

$63105168421421 \ldots$

Thus, starting from the 6th term, 42 1 repeats cyclically. We observe that at the 7th, 10th, 13th, etc., positions, there will be 4, i.e., at positions whose order number when divided by 3 gives a remainder of 1, there will be 4; at the 8th, 11th, 14th, etc., positions, there will be 2, i.e., at positions whose order number when divided by 3 gives a remainder of 2, there will be 2; and at the 9th, 12th, 15th, etc., positions, there will be 1, i.e., at positions whose order number is divisible by 3, there will be 1. Since $2018=3 \cdot 672+2,2018$-th term in the sequence is 2.