Elementary Number Theory – Finding Lowest Value of m Divisible by 79 and 83

divisibilityelementary-number-theory

Determine the smallest positive integer $m > 2$ with the property that $m^3-3m^2+2m$ is divisible by both $79$ and $83$.

I tried:
$
m^3-3m^2+2m
= m(m-1)(m-2)
$

The term is a product of 3 consecutive integers.
After that, I tried some rules of divisibility on it. But I failed to do solve the problem.

Best Answer

Notice that both $79$ and $83$ are primes.

Thus, they would each fit into $(m)(m+1)(m+2)$, and thus two or one of these would be a factor of each term in the brackets. Moreover, see how the terms have a difference of at most $2$ ($m$ and $m+2$). Thus, we can rewrite the term that contains a factor of $79$ as $79a$, and the term that contains a factor of $83$ as $83b$. Now upon subtracting them, we have the difference between the two terms to be at most two.

Thus, we have that $$|79a - 83b| \leq 2$$

Now, I will list out, in ascending order, the first multiples of $79$ and $83$, where $79$ is red and $83$ is black.

$\color{red}{79},83,\color{red}{158},166,\color{red}{237},{249},\color{red}{316},{332},\color{red}{395},415,\color{red}{474},498,\color{red}{553},581,\color{red}{632},664,\color{red}{711},747,\color{red}{790},830,\color{red}{869},913,\color{red}{948},996,\color{red}{1027},1079,\color{red}{1106},1162,\color{red}{1185},1245,\color{red}{1264},1328,\color{red}{1343},1411,\color{red}{1422},1494,\color{red}{1501},1577,\color{red}{1580},\color{red}{1659},1660$

It is easily verified that the difference of $2$ or less only appears at $1659$ and $1660$. Thus, the smallest values for $a$ and $b$ are $a=21$ and $b=20$.

Since they have a difference of one, we can put $1660$ and $1659$ as $m$ and $(m-1)$ respectively, or $(m-1)$ and $(m-2)$ respectively. However, we can see that the former option gives us $m=1660$ but the latter option gives us $m=1661$, thus we will pick the former option and yield that $m=1660$.