Example4.28
We will compute 271321(mod481). Notice that
321=20+26+28;​
hence, computing 271321(mod481) is the same as computing
27120+26+28≡27120⋅27126⋅27128(mod481).​
So it will suffice to compute 2712i(mod481) where i=0,6,8. It is very easy to see that
27121=73,441≡329(mod481).​
We can square this result to obtain a value for 27122(mod481):
27122​≡(27121)2(mod481)≡(329)2(mod481)≡108,241(mod481)≡16(mod481).​
We are using the fact that (a2n)2≡a2⋅2n≡a2n+1(modn). Continuing, we can calculate
27126≡419(mod481)​
and
27128≡16(mod481).​
Therefore,
271321​≡27120+26+28(mod481)≡27120⋅27126⋅27128(mod481)≡271⋅419⋅16(mod481)≡1,816,784(mod481)≡47(mod481).​