1. ## Big power

I am trying to find a way to obtain the last 3 digits of k,
where k = 4321^(10^4321 + 1).

I can see that 10^4321 + 1 = log(k) / log(4321),
or log(k) / log(4321) - 10^4321 = 1

However, numbers are so huge here that I think the use of
some trick or theory is required.

Can anyone help. Thank you.

2. Even though $10^{4321}+1$ is a huge number, it still ends in 001.

Therefore, if I am not mistaken, $4321^{10^{4321}+1}$ will end in 321.

3. Hello, Wilmer!

Find the last 3 digits of $k$, where: . $k \:= \:4321^{10^{4321} + 1}$
I used a very primtive approach . . .

Since we are concerned with the last three digits only,
. . we can raise $321$ to various powers.

I found that: . $321^{25}$ ends in $001.$

That is, consecutive powers of 321 end in: . $321,\,041,\,161,\,681,\,601,\,\cdots \,001$
. . It goes through a 25-step cycle and starts over.

The power $10^{4321} + 1 \:=\:10^2\!\cdot\!10^{4319} + 1 \:=\:25\!\cdot\!4\!\cdot\!10^{4319} + 1$

$\text{Then we have: }\;321^{25\cdot4\cdot10^{4319} + 1} \:=\;321^{25\cdot4\cdot10^{4319}}\cdot321^1 \:=\:\underbrace{(321^{25})}_{\text{This ends in 001}}\,\!\!\!\!\!\!\!^{4\cdot10^{4319}} \cdot321$

So we have: . $(001)^{4\cdot10^{4319}}\cdot321 \quad\Rightarrow\quad (001)\cdot 321 \quad\Rightarrow\quad321$

4. What we want is $4321^(10^(4321)+1) mod 1000$

$4321^{10^{4321}+1} \equiv 321^{10^{4321}+1}$

We need to use Euler's totient theorem $a^{\phi(n)}\equiv1$ mod n

$\phi(1000)$ is the number of numbers smaller than 1000 and coprime with 1000.
1000 = $2^35^3$
so we just need to count the number of multiples of 2 and 5 less than 1000. There are 1000/2 = 500 even numbers, 1000/5 = 200 multiples of 5 and 1000/10=100 multiples of 2 and 5.
This gives us $\phi(1000)$ = 1000-500-200+100 = 400

so we have
$321^{10^{4321}+1} \equiv 321^{10^{4321}+1 \pmod{400}}$
but 400| $10^4321$
so $321^{10^{4321}+1} \equiv 321^1$ =321

5. Thank you very much everyone.
I sure learned a lot.