Give $P$ a integer number where $$P=2^{3^{4^{5^{\dots1000}}}}$$ Then
- Compute The product of dígits of $P$
- Compute $P\pmod{5}$
for The segond i think its will be something like $$\begin{align} 2&\equiv2\pmod5\\ 2^2&\equiv4\pmod5\\ 2^3&\equiv3\pmod5\\ 2^4&\equiv1\pmod5\\ 3&\equiv3\pmod4\\ 3^2&\equiv1\pmod4\\ P&=2^{3^{4^{5^{\dots1000}}}}\\ &\equiv2^{3^{2}}\pmod5\\ &\equiv2^{1}\pmod5\\ &\equiv2\pmod5 \end{align}$$ but for The first question i dont know how to start.
For $1\le a\le 1000$, let $$ f(a):=a^{(a+1)^{(a+2)^{\cdots^{1000}}}}.$$ Since $f(4)$ is even, $f(3)$ is a power of $9$. Then since $2^9\equiv 2\pmod5$, we conclude $f(2)=2^{9\cdot9\cdot9\cdot\ldots\cdot9}\equiv 2\pmod 5$, thus answering the second part.
For even $a<1000$ we clearly have $f(a)\equiv 0\pmod 4$, whereas for odd $a$ we have $f(a)\equiv 1\pmod 8$ as it is the square of an odd number.
We shall work our way down from $f(4)$. From $4^5\equiv -1\pmod{5^2}$ (and of course $(-1)^5\equiv -1\pmod {5^2}$) we conclude $f(4)=4^{{5\cdot 5\cdot\ldots\cdot 5}}\equiv -1\pmod{5^2}$ (in fact, $f(4)\equiv -1$ modulo really high powers of $5$). Together with $f(4)\equiv 0\pmod 4$, this implies that $f(4)\equiv 24\pmod{{2^25^2}}$. As $2^25^2=\phi(5^3)$, this implies $f(3)\equiv 3^{24}\pmod{5^3}$. This can be computed (e.g., by repeated squaring) as $f(3)\equiv 106\pmod{5^3}$. Together with $f(3)\equiv 1\pmod 4$, we conclude $f(3)\equiv 481\pmod{2^25^3}$. Therefore $f(2)\equiv 2^{481}\pmod{5^4}$. Again by repeated squaring we compute $f(2)\equiv 352\pmod{5^4}$. Together with $f(2)\equiv 0\pmod{2^4}$ we conclude $f(2)\equiv 352\pmod{10^4}$. Therefore the decimal digit expansion of $f(2)$ ends in $\ldots 0352$, and the product of all decimal digits of $f(2)$ is zero.
Remark: Already $2^{3^{4^5}}$ ends in $\ldots 5280666917347210\mathbf{0352}$, but $2^{3^4}$ ends in $\ldots\mathbf 2352$.