Australian Math Competition Problem I am not really sure what to tag this question as, so please forgive me for wrongly categorising it.
The question is as follows:
The first number in a list is 2. After that, each number is calculated by adding the digits of the previous number together and squaring the result. What is the 2022nd number in the list?
If I have not misunderstood, the beginning of the list would be [2, 4, 16, 49, 169...].
Please assist me in solving this problem, as I have no idea how to calculated the nth number in this.

HINT: The next number is $256$, and then so the next is $169$, and thus the next is $256$ again, and then the next is $169$....
To sum up, the $2022$nd number is $256$ and the $2023$rd number is $169$.
Intuitively, if one were to take a positive number $a_0$ and form a sequence $\{a_k; k=0,1,2,\ldots\}$, where $a_{k+1}=O(\ln(a^2_k))$, then the resulting sequence is bounded--there is a positive number $A$ such that the inequality $a_k \le A$ holds for all integers $k$, and infact $A$ is not that large. Something similar is happening here with this sequence; note that the sum of the digits of a number $M$ is $O(\ln M)$. And so the resulting sequence of positive integers as specified in the problem, is bounded from above, where the upper bound is not that high. Thus, as this is a sequence of positive integers bounded from above, there was guaranteed to be a repeat in this sequence of integers, and as the bound is not that high, this repeat would show itself soon enough for exhaustive search. Then once a repeat is found, one can then observe that a repeat guarantees that this sequence of integers is eventually periodic.
