Last digit of high numbered power up

89 Views Asked by At

So the other day i asked this question: Repetitive 1-9 pow last digit

Which, well the title speaks for itself, and i got a great answer. However, now i'm onto even deeper problems.

So lets take this one:

$12^{30^{21}}$

12 mod 10 is 2 which gives me period 4. That gives me 30 on mod 4

$30^{1}$mod 4 = 2, $30^{2}$mod 4 = 4, $30^{3}$ = 0, $30^{4}$ = 4, $30^{5}$ = 4, $30^{6}$ = 0 and the rest is also 0...

I then make the assumption that 30 mod 4 gives me period 6

21 mod 6 gives me 3.

Then we got 2^2^3 mod 10 which is 4, when in fact it should be 6. What am i doing wrong here?

Also the power of 30 is quite simple, but what happens when higher numbers occur?

$937640^{767456^{98124}}$ or $937640^{767456^{98124}}$

1

There are 1 best solutions below

7
On BEST ANSWER

I have no idea where "period 6" comes from. Note that $30\equiv_42$, so any power of $30$ with higher exponent than $1$ is just going to be $0\equiv_44$. Thus $30^{21}\equiv_44$, which gives $$12^{30^{21}}\equiv_{10} 2^{30^{21}}\equiv_{10}2^4\equiv_{10}6$$ As for larger numbers, just reduce all bases modulo whatever you're working with, and everything works out. In your "larger numbers" examples (which are identical, by the way), they end in a $0$, so of course any positive integer power of that is also going to end in a $0$. But if we were to change it a bit, for the sake of example, we would do $$ 937643^{767455^{98124}}\equiv_{10} 3^{767455^{98124}} $$ Now, the powers of $3$ modulo $10$ are $3, 9, 7, 1, 3, 9, 7, 1, \ldots$, which is a period of $4$. Thus we are interested in the exponent modulo $4$. We have $767455\equiv_4 -1$, which gives us $$ 767455^{98124} \equiv_4 (-1)^{98124} $$ And the result of raising $-1$ to any power is just dependent on whether the exponent is even or odd. In this case it's even, so we get $$ (-1)^{98124}\equiv_41 $$ which means that we have $$ 3^{767455^{98124}}\equiv_{10} 3^{(-1)^{98124}}\equiv_{10}3^1 $$