0

I was wondering if there is a quick way how you could find (calculate, bruteforce) $m$ in $k = n \mod m$ if you know $k$ and $n$.

Mars Plastic
  • 4,239
Wouterr
  • 111

1 Answers1

5

The one and only thing you can say is that $m$ divides $k-n$. (Depending on how you define modulo, we also have $m>n$). Noting more can be gleaned from the given information.

For instance, $15\equiv 1\pmod m$ gives us that $m$ is either $2,7$ or $14$.

Arthur
  • 199,419