Least residue power modulo May someone confirm that the least residue of $44^8$ modulo $7$ is $4$ please?
And that $2^2 \equiv  4\, (\!\!\!\mod 7)$?
Thanks in advance.

Lemma needed : For $a,b,n,r \in \mathbb{Z^+},$
$$a \equiv b \pmod{n} \implies a^r \equiv b^r \pmod{n}.$$
Proof:
$\displaystyle a\equiv b \pmod{n} \implies n | (a - b) \implies$
$\displaystyle \exists ~k \in \mathbb{Z} ~\text{such that}~ a = (b + nk) \implies$
$\displaystyle (a^r - b^r) = (b + nk)^r - b^r$
[Using binomial expansion]
$\displaystyle =~ \sum_{i=0}^r \left[(b)^i (nk)^{r - i}\right]
~-~ b^r$
$\displaystyle =~ \sum_{i=0}^{(r-1)} \left[(b)^i (nk)^{r - i}\right].$
Since the above summation stops at $(r-1)$,
$n$ divides each term in the summation.
Therefore
$n | (a^r - b^r) \implies a^r \equiv b^r \pmod{n}.$
