We observe that
only one fraction has a denominator of 2
As we have x = 2^1234567, we can try to plug it in. We will use the prime factorization of the numbers to make things easier.
We first multiply by 21/2, getting 2^1234566 * 3 * 7. Because all the fractions before 21/2 have a prime factor other than 2, 3, or 7, we know that the function will continue multiplying by 21/2 until there are no factors of 2 left. This leaves us with 3^1234567 * 7^1234567.
Next,
we multiply by 5/7. Because the first fraction in the list has a denominator of 5, we know that anytime we multiply by 5/7 we will essentially be multiplying by 11/7. We multiply and get 3^1234567 * 7^1234566 * 11. 30/77 is the next fraction to multiply by. We end up with 2 * 3^1234568 * 5 * 7^1234565. Multiplying by 11/5 gives us 2 * 3^1234568 * 7^1234565 * 11.
We notice that
because we have such a large amount of 7s, we will keep on multiplying by 30/77 and 11/5 until we run out of 7s. We realize that every time the number of 7s decreases by 1, the number of 2s increases by 1 and the number of 3s increases by 1. We increase the number of factors of 2 and 3 by 1234565 and remove all the factors of 7 to get 2^1234566 * 3^2469133 * 11. We multiply by 1/11 to remove the factor of 11 and get 2^1234566 * 3^2469133.
This leaves us in the same place as the beginning, except
we have a bunch of factors of 3 and the number of factors of 2 decreased by 1.
Because none of the denominators have a factor of 3,
we will do the same thing as before, just a smaller number of times. Eliminating all the 2s gives us 3^3703699 * 7^1234566. We multiply by 5/7 and then 11/5 to get 3^3703699 * 7^1234565 * 11. We add back the powers of 2 and 3 and remove all the powers of 7 and the one power of 11 to get 2^1234565 * 3^4938264.
We notice that
the first time the power of 3 increased by (1234567+1234566), and this time the power of 3 increased by (1234566+1234565). This means that for a power of 2, it will increase the power of 3 by (2x-1). This means the power of 3 will be $\sum_{i=1}^{1234567} 2i-1$ We can use summation properties to get $2*\sum_{i=1}^{1234567} i - 1234567$. We know that the sum of the first $n$ positive integers is $\frac{n*(n+1)}{2}$, so $\sum_{i=1}^{1234567} i = 1234567*1234568/2 = 762078456028$, so $2*\sum_{i=1}^{1234567} i - 1234567 = 1524155677489$
We see that
the final answer is 3^1524155677489, and because the last 3 digits of 3^x repeat every 100 times, we only need to take the power of 3 (mod 100), which is 89.
This means we just need to find the last 3 digits of
3^89.
We know that the last 3 digits of
3^10 are 049,
which means the last 3 digits of
3^20 are just the last 3 digits of 49^2, or 401,
which means the last 3 digits of
3^40 are just the last 3 digits of 401^2, or 801,
which means the last 3 digits of
3^80 are just the last 3 digits of 801^2, or 601,
which means the last 3 digits of
3^89 are just the last 3 digits of 601 * (the last 3 digits of 3^9).
We know that the last 3 digits of
3^9 are just 683, which means the last 3 digits of 3^89 are the last 3 digits of 601*683, which are 483.
This means our final answer is
483.
Disclaimer: My calculations are a bit messy, and a single miscalculation would make the whole answer wrong, but the general solution should still be correct.
no-computers
but how is this acomputer-puzzle
? $\endgroup$computer-science
tag, butcomputer-puzzle
looks more suitable to me. $\endgroup$