[Math] Power of very big numbers

exponentiationmodular arithmetic

So, I was solving a question, and I came across this.

If I have, x=a^b, and If I want to calculate the last digit of x, then it will be equivalent to the power of the last digit of a powered to b.

For example,
the last digit of

56^78 will be equal to the last digit of 6^8.

75^74 wil be equal to the last digit of 5^4.

Am I right in saying this? This seems to be correct for all cases. Is this right?

PS: This will be useful if I wish to calculate the last digit of very big numbers. ( like having 1000 digits or so)

Best Answer

No, this is not correct. For example, The last digit of $2^{10}=1024$ is $4$, but the last digit of $2^0$ is 1. There are many small counter examples; three more are $13^{14}$, $3^{11}$, and $12^{12}$.