Exercise 16. Suzanne multiplies two integers whose difference is 5, and Martin multiplies two integers whose difference is 8. They get the same result, which we denote as $C$. What are the possible values of $C$?
Solution alternative $n^{\circ} 1$ We use the notations from the previous solution: $C=a(a-5)=b(b-8)$. Replacing $a$ with $5-a$ changes $a(a-5)$ to $(5-a) \times(-a)=a(a-5)$. In particular, since $a+5-a=5$, the maximum of $a$ and $5-a$ is greater than or equal to $\frac{a+5-a}{2}=2.5$, so as it is an integer, it is greater than or equal to 3. Thus, we can assume $a \geq 3$. Similarly, we can assume $b \geq 4$.

Let's first consider the case where $C$ is negative: we have $0 \leq a \leq 5$, so $a=3,4$ or 5. We then get $C=-6,-4,0$. We also have $0 \leq b \leq 8$, so $b=4,5,6,7$ or 8, thus $C=-16,-15,-12,-7,0$. In particular, the only possible case is $C=0$, which is indeed possible if $a=5$ and $b=8$.

Now suppose $C>0$. Since $a \geq 3$ and $b \geq 4$ and $C=a(a-5)=b(b-8)$, we have $a \geq 6$ and $b \geq 9$. We can then try to compare $a$ and $b$.

If $a \geq b, a(a-5) \geq b(b-5)>b(b-8)$, which is contradictory. Thus $a < b$. Since $a < b$, $a(a-5) < b(b-5)$, so $a-5 < b-5$, thus $a < b$. Since $a(a-5) = b(b-8)$, we have $a-5 < b-8$, so $a < b-3$. Therefore, since $a$ and $b$ are integers, we have $b-1 \geq a \geq b-2$. There are thus two cases to consider:

$\triangleright$ If $a=b-1, C=b(b-8)=(b-1)(b-6)$, so $b^{2}-8 b=b^{2}-7 b+6$ thus $b=-6$, which is a contradiction.

$\triangleright$ If $a=b-2, C=b(b-8)=(b-2)(b-7)$ so $b^{2}-8 b=b^{2}-9 b+14$, thus $b=14$. We have $b(b-8)=6 \times 14=84$, and for $a=b-2=12, a(a-5)=12 \times 7=84$, so $a(a-5)=b(b-8)$: $C=84$ is indeed a solution.

Thus, the possible values of $C$ are 84 and 0.

![](https://cdn.mathpix.com/cropped/2024_04_29_bad7460d4ce66061b968g-21.jpg?height=54&width=1833&top_left_y=1292&top_left_x=114)
Martin. Thus, $C=a(a-5)=b(b-8)$. The idea is to "complete the squares", that is, to make a remarkable identity of the form $(a-b)^{2}=a^{2}-2 a b+b^{2}$ appear by adding and subtracting the missing quantity. For example, we can write

$$
b(b-8)=b^{2}-8 b+4^{2}-16=(b-4)^{2}-16
$$

we can notice that this corresponds to the canonical form of the quadratic polynomial $X(X-8)$.

Similarly, we have

$$
a(a-5)=\left(a-\frac{5}{2}\right)^{2}-\left(\frac{5}{2}\right)^{2}
$$

In short, we can then write that

$$
4 C=(2 a-5)^{2}-25=(2 b-8)^{2}-64
$$

which can be rewritten as

$$
64-25=39=(2 b-8)^{2}-(2 a-5)^{2}=(2(a+b)-13)(2(b-a)-3)
$$

Since $39=1 \cdot 39=3 \cdot 13$, there are a few cases to handle manually:

$\triangleright 2(a+b)-13=1$ and $2(b-a)-3=39$ which gives $4 b-16=40$ or $b=14$ and thus $C=84$.

$\triangleright 2(a+b)-13=-1$ and $2(b-a)-3=-39$ which gives $4 b-16=-40$ or $b=-6$ and thus $C=84$.

$\triangleright 2(a+b)-13=3$ and $2(b-a)-3=13$ which gives $4 b-16=16$ or $b=8$ and thus $C=0$.

$\triangleright 2(a+b)-13=-3$ and $2(b-a)-3=-13$ which gives $4 b-16=-16$ or $b=0$ and thus $C=0$.

$\triangleright 2(a+b)-13=13$ and $2(b-a)-3=3$ which gives $4 b-16=16$ or $b=8$ and thus $C=0$.

$\triangleright 2(a+b)-13=-13$ and $2(b-a)-3=-3$ which gives $4 b-16=-16$ or $b=0$ and thus $C=0$.

$\triangleright 2(a+b)-13=39$ and $2(b-a)-3=1$ which gives $4 b-16=40$ or $b=14$ and thus $C=84$.

$\triangleright 2(a+b)-13=-39$ and $2(b-a)-3=-1$ which gives $4 b-16=-40$ or $b=-6$ and thus $C=84$.

In short, $C$ can take the values 0 or 84.