Q:

Remainder on division by 7

Please vet the following, as I hope they are not too simple exercises.

What is the remainder of $1811196^3$ when divided by $7$?

I start with an integer n, as any number on division by 7 will have its remainder fall in one of the seven bins- $0,1,...,6$.
If take the various values of n as by the division algorithm, then for a variable $q \in \mathbb {Z}$ have the form : $\{7q, 7q + 1, 7q +2,..., 7q+6\}$.
The cubing will create three terms for each, with the variable $q$ containing terms as multiple of $7$, while the constant remainder being given after division by $7$ as: $0, 1, 1, 6, 1, 6, 6$, or in the set: $\{ 0, 1, 6 \}$.
As $1811196\equiv 2\pmod 7$, so $2^3  \equiv 1\pmod 7$

For $n\equiv 7\pmod 8$, what is $(n^2 -n)\mod 8$?

By the logic used in $1$ above, $n^2\equiv 1\pmod 8$. So, $(n^2 -n)\mod 8$ $ \equiv 2\pmod 8$

Assume that $n\equiv r\pmod m$, then what is the relationship of remainder of $m\mid n^2$ to the remainder of $m\mid r^2$?

Given, $n=qm +r, \exists q \in \mathbb{Z}$, or equivalently $n\equiv r\pmod m$; have $n^2\equiv r^2\pmod m$. So, they are the same value.

A:

You are correct, but your first and in third answers are too long. My answer to the first quest would just be$$1\,811\,196\equiv2\pmod7\implies1\,811\,196^3\equiv2^3\equiv1\pmod7$$and my answer to the third question would just be\begin{align}n\equiv r\pmod m&\implies n^2\equiv r^2\pmod m\\&\iff\text{the remainders of the divisions of $n^2$ and $r^2$ by $m$ are the same.}\end{align}

