Hello,
I'm having a problem with modulo arithmetic, not homework, just something that is confusing me. I'd be glad if anyone can help me.
Let a = 37 and b = 151
Then a and b are congruent to 1 MOD 6
If I take the average of these numbers, the result c = (a + b)/2 = 94 is congruent to 4 MOD 6
My problem is, if I start by using the modulo values of
a\(\displaystyle \ \equiv\) 1 MOD 6
b\(\displaystyle \ \equiv\) 1 MOD 6
then I get c = (a+b)/2 \(\displaystyle \equiv\) 1 MOD 6
instead of c \(\displaystyle \equiv\) 4 MOD 6
Can someone tell me what I'm doing wrong?
Thank you
I'm having a problem with modulo arithmetic, not homework, just something that is confusing me. I'd be glad if anyone can help me.
Let a = 37 and b = 151
Then a and b are congruent to 1 MOD 6
If I take the average of these numbers, the result c = (a + b)/2 = 94 is congruent to 4 MOD 6
My problem is, if I start by using the modulo values of
a\(\displaystyle \ \equiv\) 1 MOD 6
b\(\displaystyle \ \equiv\) 1 MOD 6
then I get c = (a+b)/2 \(\displaystyle \equiv\) 1 MOD 6
instead of c \(\displaystyle \equiv\) 4 MOD 6
Can someone tell me what I'm doing wrong?
Thank you