I have a system of two modular congruences:
$x \equiv k \bmod{m}$
and
$x \equiv 0 \bmod{23}$
Where $k$ and $m$ are known quantities and I want to find $x$. I'm at a loss as to whether or not there's a closed form for this, and even if I find this value of $x$, how do I know what the next workable value of $x$ is? Would it be $x$, $x + 23m$, $x + 46m$, $x + 69m$, etc? Or is it multiples of $\text{lcm}(23, m)$?
By the Chinese Remainder Theorem we can show that
$\ \ x\, \equiv\, 23(k\cdot 23^{-1}\bmod m)\,\ \pmod{\!23m}\ \ \ {\rm if}\ \ \ 23\nmid m$
$\ \ x\, \equiv\, 23(k/23\bmod m/23)\ \ \ \ \,\pmod{\!m}\ \ \ {\rm if}\ \ \ 23\mid m,k$
$\ \ x\,$ fails to exist $ $ (i.e. no solution exists) $\ \ \ \ \ \ \ {\rm if}\ \ \ 23\mid m,\ 23\nmid k$
Remark $ $ We can unify all cases by using general modular fractions, yielding
$\ \ x\, \equiv\, 23\left(\dfrac{k}{23}\bmod m\right)$