[Math] Units digit when there is a power of power

modular arithmetic

How do you find the units digit in case of an expression like this

$$ 7^{8^7}
$$

I know how to find the units digit when there is one integer and there is only one power. But how do I find it when the power has a power.

Please provide a descriptive answer.

Best Answer

Note that the last digit of a positive integer is the remainder when you divide it by $10$. Perhaps you have noted that $a^b$ and $a^{b+4}$ have the same last digit for any positive integers $a$ and $b$.

The case you have written is perhaps too easy, since the first exponent ($8$) is a multiple of $4$. Then $8^7$ is a multiple of $4$ and $7^{8^7}$ ends with the same digit as $7^4$.

In the general case, you must note also that the remainder when divided by $4$ of the sucesive powers of a number present also this "periodic behaviour". Take for example $$7^{11^9}$$ We need the remainder of $11^9:4$, but the remainder of $11:4$, $11^2:4$, $11^3:4$, etc is $1$ for even powers and $3$ for odd powers; therefore, $7^{11^9}$ ends in the same digit as $7^3$, that is, $3$.