Find the remainder of a division Which is the remainder of the division $985^{423}:98$?
That's what I have tried so far:
Let $a=985,n=98$. Then $(a,n)=1$ and $\varphi(n)=42$.
So, we have that $985^{42}\equiv 1 \pmod{98}$. Hence,
$$\begin{align}&985^{423} \\
= &985^{42 \cdot 10+3} \\
= &(985^{42})^{10}\cdot985^3\\
\equiv &985^3 \pmod{98}\end{align}$$
Is it right so far? And how can I continue? Do I have to find $985^{3}$ and then do the division,or is there also an other way??
 A: Yes. You are right so far.
To continue, notice that 
$$\begin{align}985^3 &= (980 + 5)^3\\
&\equiv 5^3 \pmod{98}\end{align}$$
which can be easily computed by hand to give
$$\begin{align}985^3&\equiv125\pmod{98}\\
&\equiv27\pmod{98}\end{align}$$
So to sum up,
$$985^{423}\equiv27\pmod{98}$$
A: Note $\,985 = 98(10)+5\,$ so $\,{\rm mod}\ 98\!:\ 985\equiv 5\,\Rightarrow\, 985^3\equiv 5^3\,$ by the Congruence Power Rule.

Congruence Sum Rule $\rm\qquad\quad  A\equiv a,\quad B\equiv b\ \Rightarrow\ \color{#c0f}{A+B\,\equiv\, a+b}\ \ \ (mod\ m)$
Proof $\rm\ \ m\: |\: A\!-\!a,\ B\!-\!b\ \Rightarrow\ m\ |\ (A\!-\!a) + (B\!-\!b)\ =\ \color{#c0f}{A+B - (a+b)} $
Congruence Product Rule $\rm\quad\ A\equiv a,\ \ and \ \  B\equiv b\ \Rightarrow\ \color{blue}{AB\equiv ab}\ \ \ (mod\ m)$
Proof $\rm\ \ m\: |\: A\!-\!a,\ B\!-\!b\ \Rightarrow\ m\ |\ (A\!-\!a)\ B + a\ (B\!-\!b)\ =\ \color{blue}{AB - ab} $
Congruence Power Rule $\rm\qquad \color{}{A\equiv a}\ \Rightarrow\ \color{#c00}{A^n\equiv a^n}\ \  (mod\ m)$
Proof $\ $ It is true for $\rm\,n=1\,$ and $\rm\,A\equiv a,\ A^n\equiv a^n \Rightarrow\, \color{#c00}{A^{n+1}\equiv a^{n+1}},\,$ by the Product Rule, so the result follows by induction on $\,n.$
Polynomial Congruence Rule $\ $ If $\,f(x)\,$ is polynomial with integer coefficients then  $\ A\equiv a\ \Rightarrow\ f(A)\equiv f(a)\,\pmod m.$
Proof $\ $ By induction on $\, n = $ degree $f.\,$ Clear if $\, n = 0.\,$ Else $\,f(x) = f(0) + x\,g(x)\,$ for $\,g(x)\,$ a polynomial with integer coefficients of degree $< n.\,$  By induction $\,g(A)\equiv g(a)\,$ so $\, A g(A)\equiv a g(A)\,$ by the Product Rule. Hence $\,f(A) = f(0)+Ag(A)\equiv f(0)+ag(a) = f(a)\,$ by the Sum Rule. 
Beware $ $ that such rules need not hold true for other operations, e.g.
the exponential analog of above $\rm A^B\equiv a^b$ is not generally true (unless $\rm B = b,\,$ so it reduces to the Power Rule, so follows by inductively applying $\,\rm b\,$ times the Product Rule).
