0

What multiple, m, of a, divided by b, returns a remainder that is c below m?

What formula do you use for this math question?

for example if a is 73 and b, the divisor is 97. Then what multiple, m, is to be multiplied such that the remainder is 35 below m

In this case the answer by searching is 79. That is, (79 x 73) mod 97 = 44 [44 is 35 below 79].

If I don't want to search then how to devise formula to give correct answer?

For example, if a is 475813677834783 and b, the divisor, is 37683749758978594988734958734997589341. Then what multiple, m, is to be multiplied such that the remainder is 6783687436873 below m?

  • Not sure this is clear. Are you assuming that $0â‰Īm-c<b$? In any case, it looks like you are after the linear congruence $ma\equiv m-c \pmod b$, which has the solution $m\equiv (-c)\times (a-1)^{-1}\pmod b$ at least if $a-1$ is prime to $b$. – lulu May 29 '21 at 17:16
  • Here is WA's solution to your specific example. – lulu May 29 '21 at 17:20
  • As explained in the first comment, this is a linear congruence, and we have many posts which explain how to solve them,, e.g. see the linked dupe and its links. – Bill Dubuque May 29 '21 at 19:23

0 Answers0