0

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

Rezwan Arefin
  • 3,106
  • 1
  • 14
  • 39

2 Answers2

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

Rezwan Arefin
  • 3,106
  • 1
  • 14
  • 39
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.

Brian
  • 138