4

Is it possible to restrict $p$ and $q$ ($p, q \in primes$) in such a way that $(x$ mod $p)$ mod $q \equiv x$ mod $q$ always holds?

I actually need a looser condition:

I need that if $x \equiv 0$ mod $q$, then $x \equiv 0$ mod $p$ mod $q$.

Is the above mentioned condition (in bold) possible?

AdveRSAry
  • 165
  • 6

1 Answers1

3

If $x \equiv 0 \mod q$, we have $x = kq$.

Now, for all integer $k$, we must have that $(kq \bmod p) \equiv 0 \mod q$.

However, as $q$ and $p$ are coprime $(kq \bmod p)$ takes on all residues $[0, p-1]$, so we see this is impossible.

orlp
  • 10,508