Define . So and so on. Phrased this way, we are asked to calculate . By nature of modular arithmetic, it does not matter if we calculate first, then reduce it modulo 100000, or if we calculate f(9), reduce it, then calculate f of the reduced answer, and so on. In other words, we can iterate via:
Iterating 1000 times, reducing the answer each time. Setting this ball in motion, we get:
Here we notice that and therefore for all . In other words, we found a fixed point in the function f and need go no further. Namely, . Thus we have found our answer.
This seems like an odd coincidence, and begs the general question: Given a,b, for what value of x does , and for what values a,b does no such x exist?