Show thatis not divisible by
.
I do not know how to approach this.
Well, I didn't do it in exactly that order, but that's equivalent. The steps can be written for example like this:
But anyone reasonably familiar with congruences should be able to follow the one-liner I wrote above without any intermediate steps.
In general, in the context of an exam, you may be presented withsuch that gcd(a,n)=1 and be expected to recognise that Euler's theorem applies. But if
is congruent to 1, 0, or -1 (mod n), then you should definitely take advantage of that to make calculations very easy. And there are other related topics you can learn about if you are interested in such things.
A little of both, I guess. The Chinese Remainder Theorem can be used if gcd(a,n)>1, and (mainly discussed in a computer science context) there's an algorithm for fast modular exponentiation by repeated squaring. Using such concepts you could compute things like the common residue offor nontrivial a,b,c,d,n. (And the numbers can get very large very quickly; for example,
has 40403563 digits.) You probably won't get something like that on a test, but nevertheless it's possible that having extra knowledge might provide a shortcut for certain problems.