# Computation Workshop Solution Checker

## Tower Of Twos

Let $$T(n)$$ be the tower of powers of $$2$$ of height $$n$$. For example:

• $$T(3) = 2^{2^2} = 2^4 = 16$$

• $$T(4) = 2^{2^{2^2}} = 2^{16} = 65536$$

So the last digit of $$T(4)$$ is $$6$$.

Part A Determine the last two digits of $$T(100)$$. Determine the remainder when $$T(2021)$$ is divided by $$2021$$.

## Van Erk's Sequence

Van Erk's Sequence begins in the following manner, with $$V(0)=V(1)=0$$ and $$V(2)=1$$.

$$V(0),V(1),V(2),V(3), \ldots = 0, 0, 1, 0, 2, 0, 2, 2, 1, 6, 0, 5, 0, 2, \ldots$$

Suppose the $$n^{th}$$ term is $$V(n) = x$$. Then the $$(n+1)^{th}$$ term is determined by:

• If $$x$$ has not appeared in the sequence before $$V(n)$$, then $$V(n+1) = 0$$.
• Otherwise, if the $$k^{th}$$ term is $$V(k) = x$$ and this is the last appearance of $$x$$ in the sequence before $$V(n)$$, then $$V(n+1) = n-k$$.
So for example $$V(9) = 6$$ because the previous term is $$V(8) = 1$$ and the last appearance of $$1$$ in the sequence is $$V(2) = 1$$. Whilst $$V(10) = 0$$ because the previous term is $$V(9) = 6$$ and the number $$6$$ has not appeared in the sequence before $$V(9)$$.

Part A Determine $$V(123)$$ Determine $$V(1234567)$$