Let's I have an integer a and take it's modulo with M (M is a prime Number) which is b.
i.e. $b = {a\mod M}$
I would like to get $a \mod N$ by doing some operation on operation on b along with M , N ? .
i.e. [$a\mod N$] = [b some operation with N , M]
e.g. a = 20 , M = 23 and N=15
then $b = a\mod M$
so , $b = 20 $
$a\mod N = 5 $.
There is any way to get 5 by doing some operation on b along with M , N ?
Note : Here I used square brackets to represent together $a\mod N$ .
If $N>M$, that looks difficult, because $b$ can take $M$ different values, while $a\bmod N$ can take $N$ different ones.
If $N<M$, it looks difficult as well, because any $a=b+kM$ will give the same $b$, while $$a\bmod N=(b + kM)\bmod N=(b + (kM\bmod N))\bmod N$$ can take any value.