Let $x$ be such that:
$602\leq x\leq 608$
$x \bmod 23 = 7$
$x \bmod 13 = 7$
I find $x=605$ by guessing and testing. Is there any better way?
Let $x$ be such that:
$602\leq x\leq 608$
$x \bmod 23 = 7$
$x \bmod 13 = 7$
I find $x=605$ by guessing and testing. Is there any better way?
As $13$ and $23$ are coprime, the general solution to the system of congruences \begin{cases}x\equiv 7 \mod 23,\\x\equiv 7\mod 13,\end{cases} is given by the formula $\;x\equiv 7\mod 23\cdot 13=299$. So we have to find $k\in\mathbf Z$ such that $$x=7+299k\in [602,608]$$ Clearly it is obtained for $k=2$ and $x=605$.