How would I evaluate this?

19 ^ 99 mod 160

The usual method using Euler's Theorem doesn't seem to help.

Is there another strategy I should learn about?

#maths #numbertheory

@rzeta0 Can you not just compute it piecemeal? So eg work out 19^3 mod 160, cube the result to give you 19^9, and so on. Because you can keep taking the result modulo 160, the numbers never get too big.

@kbm0

I have to think about this - it seems like a simple method.

Why didn't I think of it? Is it because my brain has become stuck in the methods taught by the textbook I'm following and not seeing beyond those.

@kbm0

I've done that thinking and this is a great approach

thank you!