0

Country A has elections every 4 years with its first election in 1997. Country B has elections every 5 years with its first election in 1994. When would be the first time that both the countries will have election in the same year?

Work so far: I have arrived at the diophantine equation $$1997 + 4n_1 = 1994 + 5n_2$$ or $$5n_2-4n_1 = 3$$ Is there an easier way to solve this or is solving the diophantine equation the only way. Please give detailed solution.

Bill Dubuque
  • 272,048

1 Answers1

0

By Bezout’s identity, for all integers $a$ and $b$, there exist integers $s$ and $t$ such that:

$as+bt=\gcd(a,b)$

Now, if $a=5$ and $b=4$, we get $5-4=1$. Now simply multiply that equation by $3$, giving $5\cdot3-4\cdot3=3$.

Thus, $n_2=n_1=3$

Malady
  • 941
  • 1
  • 10