You can use fast exponentiation: modulo $100$
$$33^2\equiv -11,\quad 33^4\equiv 21,\quad 33^8\equiv 441\equiv 41,\quad 33^{16}\equiv1681\equiv -19$$
whence $\,33^{20}\equiv -19\cdot 21 =-(20-1)(20+1)\equiv 1$.
OK, for what it's worth, the answer can be derived by casting out all factors of $5$ and multiplying the resulting numbers incrementally $\bmod 100000$, which also allows us to also divide out from the running product the same power of $2$ as the power of $5$ that we just cast out.
As a way of checking any more elegant mathematical approach, therefore, the result is
$15968$
As an aside, I'll share the process I used to calculate this and justify a shortcut that I used.
The basic idea here was to multiply successive numbers into a running product, excluding powers of $5$ and adjusting powers of $2$. The process for each number was:
- find the highest power of $5$ that divides the new number
- divide that out of the number
- multiply the adjusted number into the running product and divide by an equivalent power of $2$
- find the residue $\bmod 100000$
Note that this gives identical running $\bmod 100000$ values to @skyking's approach.
There is a intermittent problem with this approach, in that the running product will potentially be wrong for a couple of numbers after a large power of $5$ is divided out. Effectively, the value should be saturated with factors of $2$ from $8!$ onwards, but dividing out a suitable power of two may disturb this briefly. For example, the value for $15!$ is out in this process - $24368$ instead of the correct value, $74368$. Nevertheless, once a suitable number of factors of two in subsequent numbers are multiplied back into the product, the $\bmod 100000$ value gets back on track.
$2017$, occurring as it does directly after $2016$ = $2^5\cdot 63$, has an accurate running product by this method.
An continuously accurate running value can be produced, if necessary, by building up a "reserve" of a few powers of $2$ separately from a running product calculation, by stripping out powers of two from the successive values until the reserve is full. This is then used to compensate for powers of $5$ encountered, and multiplying these back in to the reduced running product. This correct gives the value for $15$ etc.
Best Answer
Let $\psi(0)=1$ and $\psi (n)=n^{\psi (n-1)} $. We have to find $\psi (2018)\pmod {10^5} $.
Clearly $\psi (2015)\equiv 0\pmod {5^2} $ and $\psi (2015)\equiv 1\pmod 4$, from which $\psi (2015)\equiv 25\pmod {4\cdot 5^2} $, by chinese remainder theorem.
Consequently, $\psi (2016)\equiv 2016^{25}\equiv 16^{25}\equiv 2^{100}\equiv 1\pmod {5^3}$. On the other hand, $\psi (2016)\equiv 0\pmod 4$, from which $\psi (2016)\equiv 376\pmod {4\cdot 5^3} $, by chinese remainder theorem.
Consequently, $\psi (2017)\equiv 2017^{376}\equiv 142^{376}\equiv 406\pmod {5^4} $. On the other hand $\psi (2017)\equiv 1\pmod 4$, from which $\psi(2017)\equiv 2281\pmod {4\cdot 5^4} $, by chinese remainder theorem.
Consequently, $\psi (2018)\equiv 2018^{2281}\equiv 11768\pmod {5^5} $. On the other hand, $\psi (2018)\equiv 0\pmod {2^5} $, from which $\psi (2018)\equiv 36768\pmod {10^5} $, by chinese remainder theorem.