0

Just learning my ways around logic mathematics for uni and a little lost with how to approach and format this question.

Prove, using cases, that, if $n ∈ \mathbb Z$ has remainder $1$ or $2$ when divided by $3,$ then $n^2$ has remainder $1$ when divided by $3$.

J. W. Tanner
  • 60,406

3 Answers3

0

Consider the cases 1, 2, 4, and 5. Multiplying by 2 you have 2, 4, 8, and 10, and the respective remainders are 2, 1, 2, and 1.

In general integers with remainder 1 have the form 3n+1, and multiplying by 2 you have 6n+2, which has remainder 2. Similarly for remainder 2, 3n+2, and multiplying by 2 you have 6n+4, which has remainder 1.

Using modular arithmetic, $$n \equiv 1 \mod 3$$ Multiply by 2: $$2n \equiv 2 \mod 3$$ thus the remainder is 2, and: $$n \equiv 2 \mod 3$$ Multiply by 2: $$2n \equiv 4 \mod 3$$ which is $$2n \equiv 1 \mod 3$$ and the remainder is 1.

If you meant $n^2$, then consider 1, 2, 4, and 5. The squares are 1, 4, 16, and 25, all of which have remainder 1.

Using modular, $$n \equiv 1 \mod 3$$ represents integers with remainder 1. Squaring, you have $$n^2 \equiv 1 \mod 3$$ which again is remainder 1. Then remainder 2 can be represented by $$n \equiv 2 \mod 3$$ Squaring: $$n^2 \equiv 4 \mod 3$$ Again, remainder 1, since $4 \equiv 1 \mod 3$

Vahan
  • 415
  • 2
  • 14
0

If $n \in \mathbb Z$ has remainder $1$ when divided by $3$ then $n=3k+1$ for some $k\in\mathbb Z$

so $n^2=(3k+1)^2=9k^2+6k+1=3(3k^2+2k)+1.$

If $n \in \mathbb Z$ has remainder $2$ when divided by $3$ then $n=3l+2$ for some $l\in\mathbb Z$

so $n^2=(3l+2)^2=9l^2+12l+4=3(3l^2+4l+1)+1.$

In either of these cases, $n^2$ has remainder $1$ when divided by $3$.

J. W. Tanner
  • 60,406
0

$n= 3 q + 1$ or $n=3q+2$ for q positive integer then

$n^2 = (3q+1)^2 = 9 q^2 + 6 q + 1$ with remainder 1 or $n^2 = (3q+2)^2 = 9 q^2 + 12 q + 4 $ with remainder of 1