-1

Question: The sequence $f(n)$ is given by $f(n + 1) = 2^{f(n)}$ for $n \geq 1$ with $f(0) = 2$. Give a formula for $f(n) \pmod 5$ for all $n \geq 4$

Attempt: Seems this is a power tower of $2$ where $$f(1) = 2^2 = 4 \equiv -1 \pmod 5$$ $$f(2) = 2^{2^{2}} = 16 \equiv 1 \pmod 5$$ $$f(3) = 2^{2^{2^{2}}} = 2^{16} \equiv 1 \pmod 5$$

So I'm guessing that for $n \geq 4$ that $f(n) \equiv 1 \pmod 5$, but I am not sure how to prove this by induction. Supposing that for $m \geq 4$ that $f(m) \equiv 1 \pmod 5$. Then $2^{f(m)}$ can be written for some $k$ as $2^{5k + 1}$, where by Fermat's Little Theorem, this can be simplified as $2*(2^{5})^k \equiv 2^{k+1} \pmod 5$. From here I'm not really sure what to say? Maybe my guess is wrong, any insights appreciated.

1 Answers1

1

Answering my own question thanks to the note by John Omielan...

For $n \geq 4$, $f(n) = 2^j$ for some $j \geq 2$ with $j$ a power of $2$ which is larger than $4$, then $j = 4k$ for some $k$, and hence $f(n) = 2^{4k} \equiv 1 \pmod 5$