Skip to main content
OlympiadHQ

Browse · MathNet

Print

South African Mathematics Olympiad Second Round

South Africa number theory

Problem

What is the remainder when is divided by ?
Solution
(We do this by inspection, by trying out some values until we can see the pattern.) Draw up a list of the remainders left by the powers of after division by :
0123456789101112
1248361211951071
We see that the remainders repeat every terms, since .

Now, with remainder , so .

Therefore,

So the remainder is .
Final answer
1

Techniques

Fermat / Euler / Wilson theoremsMultiplicative order