Let\[f(x) = \left\{ \begin{array}{cl} \frac{x}{21} & \text{ if }x\text{ is a multiple of 3 and 7}, \\ 3x & \text{ if }x\text{ is only a multiple of 7}, \\ 7x & \text{ if }x\text{ is only a multiple of 3}, \\ x+3 & \text{ if }x\text{ is not a multiple of 3 or 7}. \end{array} \right.\]If $f^a(x)$ means the function is nested $a$ times (for example, $f^2(x)=f(f(x))$), what is the smallest value of $a$ greater than 1 that satisfies $f(2)=f^a(2)$?

dp1806 Aug 26, 2020