Homework Help: Modular arithmetic

1. Aug 1, 2009

triac

1. The problem statement, all variables and given/known data
Okay, so I'm going to find the smallest positive remainder of (21999+31998+51997) divided by seven.

2. Relevant equations

3. The attempt at a solution
Well, I did like this:
23 is congruent to 1 (mod 7). Therefore, 21999= (23)1999/3 is congruent to 1 (mod 7).
33 is congruent to (-1) (mod 7). Therefore, 31998=(33)666 is congruent to (-1)666=1 (mod 7).
53 is congruent to (-1) (mod 7). Therefore, 51997=(53)665*25 is congruent to (-1)665*4 = -4 (mod 7)

So, all in all the remainder should be two. However it says in the key that it is six, and I can't see where I'm wrong. Got any suggestions?

2. Aug 1, 2009

Staff: Mentor

Here's what I get:
23 is congruent to 1 (mod 7). Therefore, 21999= (23)666*2 is congruent to 2 (mod 7) (not 1 mod 7 as you had).
33 is congruent to (-1) (mod 7). Therefore, 31998=(33)666 is congruent to (-1)666=1 (mod 7).
53 is congruent to (-1) (mod 7). Therefore, 51997=(53)665*25 is congruent to (-1)665*4 = -4 (mod 7) = 3 mod 7.

Add 'em up and you get 6 mod 7.

3. Aug 1, 2009

triac

Ok, thanks a lot!
I just wonder, why is it wrong to do the way I did, why doesn't it work?

4. Aug 1, 2009

tiny-tim

Hi triac!
Because 1999/3 isn't a whole number.