Remainder on division by 7

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

1. 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$

1. 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$

1. 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.

• Are you aware of binomial theorem – Atharva Shetty Dec 1 '17 at 9:26
• Yes, but will I need it. I thought it was that simple, rather than seeing any possible use of the BT, even in computing any cube or so if you mean that. I hope you meant taking two components of $1811196$ as say $1811200$ and $-4$, and taking cube to find by BT expansion. – jiten Dec 1 '17 at 9:27
• It can also be done but will become complex – Atharva Shetty Dec 1 '17 at 9:28
• I also doubt that BT would help in any way as $1811200^3$ would still need be computed. Please correct me if I have interpreted your response for usage of BT wrong. – jiten Dec 1 '17 at 9:40

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}