A number is called sympathetic if, for each divisor $d$ of $n, d+2$ is a prime number. Find the maximum number of divisors of a sympathetic number.

## - Solutions -
Let $n$ be a fixed friendly integer, and let $d$ be a divisor of $n$. If $d \equiv 1(\bmod 3)$, then $d+2 \equiv 0$ $(\bmod 3)$, and since $d+2$ is prime, this means that $d+2=3$, so $d=1$.

Now suppose there exist two primes $p$ and $q$, distinct from 3, which both divide $n$. Then $p \equiv q \equiv 2(\bmod 3)$, so $p q \equiv 1(\bmod 3)$, and $p q$ does not divide $n$. We conclude that $n$ must necessarily be of the form $3^{k}$ or $3^{k} p^{\alpha}$, with $k \in \mathbb{N}, \alpha \in\{0,1\}$ and $p$ a prime such that $p \equiv 2(\bmod 3)$. The integer $n$ will then have $\sigma_{0}(n)=(k+1)(\alpha+1)$ divisors.

We will now show that $\sigma_{0}(n) \leqslant 8$. First, since $3^{5}+2=245$ is not prime, we know that $k \leqslant 4$. Consequently, if $\alpha=0$, we know that $\sigma_{0}(n)=k+1 \leqslant 5$, and if $k \leqslant 3$, then $\sigma_{0}(n) \leqslant 2(k+1) \leqslant 8$ as well. We therefore need to show that the pair $(k, \alpha)$ cannot be equal to $(4,1)$.

To do this, proceed by contradiction, and suppose that $n=3^{4} p$. Since $3^{4} \times 5+2=$ $407=11 \times 37$, we know that $p \neq 5$, so $p$ is invertible modulo 5. Now, since $3^{2} \equiv-1$ $(\bmod 5)$, the integer 3 has order 4 modulo 5. Therefore, there must necessarily be an integer $\ell$ between 1 and 4 such that $3^{\ell} \equiv-2 p^{-1}(\bmod 5)$, and then $3^{\ell} p+2$ is not prime. $^{2}$.

We have therefore shown that $\sigma_{0}(n) \leqslant 8$. Conversely, if $n=3^{3} \times 5=135$, then $n$ of course has 8 divisors, which are $1,3,5,9,15,27,45$ and 135 itself. It is easily verified that $3,5,7,11,17$, 29, 47 and 137 are all prime numbers, for example because they have no prime factor $p \leqslant 12=\sqrt{144}$ other than themselves.

Therefore, the integer $n=135$ is friendly, and the maximum number of divisors sought is therefore equal to 8.

## V. Group C

## Content of this section

1 Algebra ..... 170
1 Functional equations ..... 170
2 Polynomials - 1st part ..... 176
3 Polynomials - $2^{\text {nd }}$ part ..... 189
4 Inequalities ..... 193
2 Arithmetic ..... 201
1 Various exercises ..... 201
2 Multiplicative order and Fermat's little theorem ..... 202
3 Combinatorics ..... 211
1 Game theory ..... 211
2 Monovariants and invariants ..... 216
3 Groups ..... 224
4 Countability ..... 227
4 Geometry ..... 228
1 Inscribed angle and South Pole theorems, power of a point ..... 228
2 Geometric transformations - $1^{\text {st }}$ part ..... 233
3 Midpoints and parallelograms ..... 235
4 Geometric transformations $-2^{\text {nd }}$ part ..... 249
5 Training exercises ..... 266
1 Mid-training exercise ..... 266
2 Final training exercise ..... 269

## 1 Algebra

## 1 Functional equations

The notion of an equation can be generalized to the search for mathematical objects of any form, satisfying a given relation.

Functional equations, whose unknown is a function, most often from $\mathbb{N}$ to $\mathbb{N}$ or $\mathbb{Z}$, or from $\mathbb{R}$ to $\mathbb{R}$, are notably present in an olympic context.

A problem of a functional equation often aims to determine the exact set of solutions, but can sometimes be limited to finding a given property of the solutions, such as periodicity or continuity, or to finding the solutions that satisfy a given condition: $f(0)=0, f$ continuous, and so on.

We will cover here the most classic strategies for solving the different types of functional equations, and will notably mention Cauchy's equation in its various forms.

## - Types of problems and classic resolution methods -

The strategies to apply in the face of a functional equation most often rely on the idea of progressively acquiring information: by knowing certain elements of the behavior of $f$, one can manipulate the functional equation so as to get closer to an equation of the form $f(x)=\ldots$, where the right-hand side does not depend on $f$. However, a bold symmetry argument, for example, can sometimes allow one to bypass this long process (but, alas!, these arguments are rarely applicable outside a particular case...)

## Before starting the resolution

Even before thinking about a resolution path, the first reaction is always to look for obvious solutions, such as:

$-x \mapsto 0$

$-x \mapsto 1$

$-x \mapsto a$

$-x \mapsto x$

$-x \mapsto x^{2}$

$-x \mapsto 1 / x$

$-x \mapsto \frac{e^{x}+e^{-x}}{2} 1$

In the vast majority of cases, the functional equation has one or more solutions of this form, which are generally the only ones. Having an idea of what one is looking for can indeed be useful when one is looking to prove it.

In parallel, proving that a functional equation admits only "simple" solutions (or, more generally, solutions of a certain form) is generally not enough to conclude: it remains to verify that all candidate solutions are (or are not!) valid, which avoids, for example, going from $7 / 7$ to $5 / 7$ on a functional equation exercise.

Also, keep in mind that a solution function is not necessarily simple (polynomial, continuous, differentiable...), but can on the contrary be a highly pathological object (we will notably see a little later functions that cover, in a certain sense, the entire plane!)

## Substitution

The first reflex to have in front of a functional equation is to substitute one of the unknowns with a value that is easily manageable, such as 0, 1, or $f(0)$. This technique has several advantages:

- It allows simplifying the functional equation, allowing, for example, to manipulate $f(x)$ instead of $f(x+f(y))$ by taking $(x, y) \leftarrow(x-f(y), y)$
- It allows obtaining information about the behavior of $f$ at particular values, thus allowing more effective substitutions (for example by simplifying the expression obtained even more).

This strategy is particularly useful in the case of expressions of the form $x+f(y)$ and $f(x \cdot f(y))$, which both simplify to $f(0)$ by taking $(x, y) \leftarrow(0,0)$; or similarly $x \cdot f(y)$ and $f(y \cdot f(x))$, which simplify to $f(0)$ by taking $(x, y) \leftarrow(1,0)$.

1. Or at least if exercise 136 of the wall seems trivial to you!