Re: Show that 98^76543 + 21 is not divisible by 11.

Thanks, this is brilliant. Did you observer that and then work on this congruence like?

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 with such 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.

Re: Show that 98^76543 + 21 is not divisible by 11.

Thanks for the advice. We haven't done Totient functions or Euler's theorem yet. What related topics are you referring to? Are they shortcuts for solving congruence problems or more advanced topics?

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 of for 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.