How to find $x$ in this range?

35 Views Asked by At

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?

3

There are 3 best solutions below

0
On BEST ANSWER

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$.

0
On

You have that $23|x-7$ and that $13|x-7$, hence $299|x-7$, i.e. $x$ has the form

$$x=299k+7$$

for some $k \in \mathbb{Z}$.

For your particular case, I don't think there is a better way since testing is quite efficient and easy.

0
On

$602÷23= 26$ remainder $4$.

$602÷13 = 46$ remainder $4$.

Now consider $602 +3 =605$.

What are the remainders dividing 605 by $23$ or $13$?