This recent question inspired me to explore values concerning modulo arithmetic of tetrations, and I thus pose the following question.
Is there a general expression for the value of $$\underbrace{2018^{2018^{2018^{\mathstrut^{.^{.^{.^{2018}}}}}}}}_{p\,\text{times}}\pmod p$$ where $p$ is odd prime?
We can write the tetration as $^p2018\pmod p$ - for details see here. Wolfram gives these first values: $$\begin{array}{c|c|c|c|c|c|c}p&3&5&7&11&13&17&19\\\hline ^p2018\pmod p&1&1&2&5&3&1&6\end{array}$$ Using FLT is out of the question for large $p$.
EDIT: Revisiting this question again, I have spotted a pattern in the table.
Claim
Let $q$ be the remainder of $\frac{{}^p2018}p$. Then $$\begin{align}p\equiv\left\{\begin{matrix} 0&\quad\text{if}\quad{}q=1\\ 1&\quad\text{otherwise} \end{matrix}\right.\pmod{q}\end{align}$$
As @didgogns has mentioned below, all known Fermat numbers satisfy the equality that $${}^p2018\pmod p=1$$
Unfortunately, your claim is not true. I'll prove that$$^{31} 2018 \equiv 28\pmod {31}$$ . Firstly, note that for all $n \geq 2$, $^n 2018$ is multiple of $4$. By Fermat's Little Theorem, we get $^{(n+1)}2018=2018^{^n 2018}\equiv2018^2\equiv1\pmod 3$ and $^{(n+1)}2018\equiv2018^4\equiv1\pmod 5$. It also holds for $n=29$, so $^{30} 2018 \equiv 0 \pmod2$, $^{30} 2018 \equiv 1 \pmod3$ and $^{30} 2018 \equiv 1 \pmod5$. By the Chinese Remainder Theorem, $^{30} 2018 \equiv 16 \pmod{30}$.
Now, $^{31} 2018 = 2018^{^{30} 2018} \equiv 2018^{16} \equiv 28\pmod {31}$.