How should I go around proving that ∀x∈Z, the remainder when x2+2x is divided by 3 is 0 or 2?
Do I use the division algorithm for this one?
Answer
As one can show, the remainder of a sum equals the sum of the remainders*
(a+b) rem m=((a rem m)+(b rem m)) rem m.
And the remainder of a product equals the product of the remainders*
(a⋅b) rem m=((a rem m)⋅(b rem m)) rem m.
(*provided you take the reminder once again to avoid exceeding the divisor.)
Then (x2+2x) rem 3=(x2 rem 3+2x rem 3) rem 3=((x rem 3)2+2(x rem 3)) rem 3.
As x rem 3 can take only the values 0,1,2, it suffices to evaluate for these.
No comments:
Post a Comment