I've been trying to study on my own, the relationship between 2 numbers as you move down the number line from a starting point and could use some help. I believe this could be described as modular arithmetic, but I've been struggling to understand that logic - so please forgive me if this question is rudimentary.
Say that you have 2 prime numbers, 61 and 17 and we imagine that you are at "61" on the number line. At this moment in time, 17 has a modulo value of 10 (61 mod 17).
Let's add 61 .. bringing us to 122. So what happened at (mod) 17? Well, ignoring the fact we could do 122 mod 17, we could just add 10 again to yield 20. BUT, 20 is 3 more than 17, so with the wrap-around we landed at 3. Let's call this answer M
Now this is of course no great revelation.. however, what I can't figure out on my own, is how to arbitrarily yield a given M
Say I want to continue adding values to 61 .. I want to reach M = 14
or when is
61 * x mod 17 = 14
So from the below table I created, the answer for x = 15. And this process seams to follow a pattern of sorts, because I used 2 prime numbers I know that each point along 17 will be hit along the line until we've added 61 17 times, at which point the pattern repeats.
So:
Could I have used a formula of some kind to arrive at 15? And if so, would that method differ for composite numbers?
Thanks for helping a novice..