0
$\begingroup$

How many numbers are there from $1$ to $1400$ which maintain these conditions: when divided by $5$ the remainder is $3$ and when divided by $7$ the remainder is $2$?

How can I start? I am newbie in modular arithmetics. I can just figure out that the number $= 5k_1+3 = 7k_2+2$.

  • 1
    Out of every 35 numbers, one fits these conditions.2017-01-08

2 Answers 2

0

Your equation $3+5x=2+7y$ can be rewritten as $5x-7y=-1$. This is called a diophantine equation, and with the euclidian algorithm we can find one of its solutions. For example, the pair $(4, 3)$ is the smallest solution, because

$3+5(4)=2+7(3)$

$23=23$

To find all numbers besides $23$ that work, we can continually add $gcd(5, 7)=35$. For example, $23+35=58$ is our second solution.

$1400/35=40$ should give you that there are $40$ possible solutions.

0

Using the Chinese Remainder Theorem:

Lets look at numbers just from $1$ to $35$.

Of these numbers, the one that fits is $23$.

Therefore, all numbers that are $23\;\text{mod}\;35$ will work.

There are $40$ such numbers between $1$ and $1400$.

These numbers are $23, 58, 93...1388$.

  • 0
    You don't need to know the solution - only that there exists a unique solution mod $35$ by CRT.2017-01-08
  • 0
    True, but I just did that because they were small numbers, and it helps show.2017-01-08