Please help! There is such a task:

Find the remainder of dividing the number 59 · 60 · 61 - 62 (mod 7)

I did the following:

1.Used the theorem (a1 + a2) (mod b) = (r1 + r2) (mod b)

True, the action replaced - (a1 * a2 * a3 - a4) (mod b) = (r1 * r2 * r3 - r4) (mod b) It was also possible to do?)

The expression passed to this type:

(59 * 60 * 61 - 62) (mod 7) = r1 * r2 * r3 - r4 (mod 7);

2. I apply r according to the formula:

rn = an (mod b)

r1 = a1 (mod 7) = 59 (mod 7) = 3; r2 = 60 (mod 7) = 4; r3 = 61 (mod 7) = 5 r4 = ??? 

I have problems with r4, because I'm trying to find the remainder of a4 = -62.

And in the end, I get the remainder 1. (- 62 mod 7) = 1

And in the book a4 is taken as just 62 without a minus.

enter image description here

And it turns out 62 (mod 7) = 6

Question:

Why is a4 taken as “62” and not “-62”?

  • It seems to me with these questions you need not here, on this issue you can hold discussions for too long. Too much but in this question. - Kel Fish
  • >> 62 (mod 7) = 6 << - counted 3*4*5+1 == 61 modulo 7 respectively 5 it turns out ... - Fat-Zer
  • @ Kel Fish Hmm, look at the sections I specified. Is it somehow related to html programming? - Sckoriy
  • @ Fat-Zer yes, I understand that if you take 62 (mod 7) = 6 and the answer is 5. But why do we take 62, and not “-62"? And don’t count the remainder like this: -62 (mod 7)? - Sckoriy
  • @Sckoriy no, not connected, but what's the matter? - Kel Fish

1 answer 1

And in your reasoning and in the example of the same transformation, just a different sign is taken out of the brackets.

By you:

 (a - b) mod p == (a + (-b)) mod p == ((a mod p) + ((-b) mod p)) mod p 

In primer:

 (a - b) mod p == ((a mod p) - (b mod p)) mod p 

As a result, the answer is still one.