Given $a, b$. How many solutions exists for $x$, such that: $$a \bmod{x}=b $$
By example:
$a = 21$ and $b = 5$
$21 \bmod{8} = 21 \bmod{16} = 5$
Then $x$ has 2 solutions
Given $a, b$. How many solutions exists for $x$, such that: $$a \bmod{x}=b $$
By example:
$a = 21$ and $b = 5$
$21 \bmod{8} = 21 \bmod{16} = 5$
Then $x$ has 2 solutions
Copyright © 2021 JogjaFile Inc.
If I understand your question correctly, consider that $a \equiv b \pmod x$ if and only if $a-b = kx$ for some $k\in\mathbb{Z^+}$. Then $x=\frac{a-b}{k}$, hence there is precisely one $x$ for each divisor $k\in\mathbb{Z^+}$.