I am trying to understand if I could know something about the following relationship:

If I have:

$b \equiv n \mod a$

$d \equiv n \mod b$

$n \gt 0$

Is it possible to know something about the direct relationship of $a$ and $d$ or a combination of both?

$d \equiv ??? \mod a$

or other combinations, for instance, like:

$bd \equiv ???\mod ab$

I have been trying trial-error samples, and I am not sure if the usual rules of modular arithmetic could be applied somehow to get that direct relationship, so I am getting lost. Any hint or help is very appreciated, thank you!


By reviewing directly the definitions of modularity:

$b = a*k_1+n,\ k_1 \in \Bbb N, k_1 \gt 0$

$d = b*k_2+n,\ k_2 \in \Bbb N, k_2 \gt 0$


$d = (a*k_1+n)*k_2+n = a*k_1*k_2+n*k_2+n = a*k_3+n*(k_2+1)$

$k_1*k_2=k_3 \in \Bbb N, k_3 \gt 0$


$d \equiv n(k_2+1) \mod a$


Use the definitions:

$$b \equiv n \pmod a \iff \ \exists \ p \ \in \mathbb Z \ / \ b = pa + n$$


$$d \equiv n \pmod b \iff \ \exists \ q \ \in \mathbb Z \ / \ d = qb + n$$

If you want to discover a property, proceed from here. Use techniques like comparing the different expressions of $n$, multiplying the two equations with each other, etc.

  • $\begingroup$ yes you are right... I was just trying to apply to standard modular arithmetic rules, but I did not find anything through them... but studying directly the definitions I did found a relationship. I will update the question. $\endgroup$ – iadvd Apr 7 '15 at 2:25

If $a$ and $b$ are relatively prime, then you can say something about bd mod ab.

  • $\begingroup$ yes they are coprime, indeed $n \neq 0$ I will update the information. If they are coprime, please what it is possible to know? thank you! $\endgroup$ – iadvd Apr 7 '15 at 1:26
  • 1
    $\begingroup$ I think I missed something, sorry. In general, if a,b are coprime, and $ c \equiv d$ mod a and $c \equiv d $ mod b, then $c \equiv d$ mod ab. $\endgroup$ – mich95 Apr 7 '15 at 1:30
  • $\begingroup$ yes but that is not the same case that I have now because in the left side of my case $b \neq d$ $\endgroup$ – iadvd Apr 7 '15 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.