The cube of any integer divided by 8 leaves a remainder?

596 Views Asked by At

Here's my approach,

Let $a \in \mathbb{Z}$, from division algorithm, therefore $a$ is of the form of $ 8k + r, \, 0≤r<8$

I then obtained $8$ cases from this, and cubed all of them, factored $8$ out.

I obtained, $0,1,3,5,7$ as the only possible remainders when $a^3$ is divided by $8$.

I'm not sure if my answer is correct or not?

Can anyone show me how do you actually solve these types of question. I don't think applying Division Algorithm each every time is convenient, especially when divisor is a big number. I almost lost all my patience just trying to solve this.

So how do you go about solving this anyway? Also, is my method and answer correct?

3

There are 3 best solutions below

6
On BEST ANSWER

Here's a sketch of how I would do it:

An integer $n$ is congruent to $0,1,\dots,6$ or $7$ modulo $8$.

  • If $n$ is even, we can factor $2$ in $n$, so we can factor $2^3=8$ in $n^3$: the remainder is $0$.
  • If $n\equiv 1, 3,5,7\mod 8$, it has order $2$, i.e. $n^2\equiv 1\mod 8$, so $n^3=n\cdot n^2\equiv n\mod 8$, and the remainders are, respectively $\;1,3,5,7$.
0
On

If $x\equiv 0\pmod 2$ then $x^3\equiv 0\pmod 8$. Otherwise, $x^2\equiv 1\pmod 8$, hence $x^3\equiv x\pmod 8$.

0
On

The 04:03 AM idea, which came to my mind is the following:

division of $a^3$ by $8$ can be written in this way:

$a^3 = 8k+r, 0 \leq r \leq 7 <=> a^3 - 8k = r <=> (a-2k^{1/3})*(a^2+2ak^{1/3}+4k^{2/3}) = r$

If a is even, then the remainder is 0, that is trivial, since you can factor 2 from the a and then you end up factoring 8, since a is cubed

If a is odd, then the LHS of the above expression is odd, which means, that r is odd.

Adding up all the results we get 0, 1, 3, 5 and 7.