Finding solutions for $x \equiv a\mathbb Z \equiv b\mathbb Z + 1$

25 Views Asked by At

If I have some equations like this:

$x \equiv a\mathbb Z \equiv b\mathbb Z + 1$

How do I find the valid values of $a,b,x \in \mathbb Z$ that fit the constraints?

No specific values are known, I'm trying to understand how to take the "intersection" of these types of equations.

From observation I've found a solution:
$x$ = 36
$a$ = 3
$b$ = 7

And it seems like there will always be a solution if $a$ and $b$ are co-prime, but I'm not sure if there are solutions where $a$ and $b$ aren't coprime, or how i'd come up with a symbolic answer to these.

These equations came from these simultaneous modulus equations:
$x\%a=0$
$x\%b=1$

In the actual case I'm trying to work towards I have quite a few more equations that I'm trying to intersect.

Thanks!