Efficient modular evaluation of large powers



> How can I have Maxima evaluate something like
> mod(10^100000,3) efficiently? Ie, w.o. raising to the power before
> applying the modulo.

     rat(10)^100000,modulus:3;