(Olympiades académiques 2004). An integer $n \geqslant 2$ is said to be academic if one can distribute the integers $1,2, \ldots, n$ into two disjoint groups $\mathscr{S}$ and $\mathscr{P}$, such that the sum of the numbers in group $\mathscr{S}$ is equal to the product of the numbers in group $\mathscr{P}$.

Determine all academic integers.
. First, let's show that every integer $n \geqslant 5$ is academic. For this, we seek the subset $\mathscr{P}$ in the particular form $\mathscr{P}=\{1, a, b\}$ with $1<a<b \leqslant n$. The product of the elements of $\mathscr{P}$ is obviously $a b$, while the sum of the elements of $\mathscr{S}$ is $\frac{n(n+1)}{2}-a-$ $b-1$. Thus, we are reduced to solving the equation:

$$
a b+a+b+1=\frac{n(n+1)}{2}
$$

which factors into the form $(a+1)(b+1)=\frac{n(n+1)}{2}$. If $n$ is even, it suffices to choose $a=\frac{n}{2}-1$ and $b=n$. If, on the other hand, $n$ is odd, we take $a=\frac{n-1}{2}$ and $b=n-1$. In both cases, we verify that the inequality $1<a<b \leqslant n$ is well satisfied since $n \geqslant 5$.

It remains to handle the cases $n=2,3,4$. It is quite clear that 2 is not academic. However, 3 is academic since we can choose $\mathscr{S}=\{1,2\}$ and $\mathscr{P}=\{3\}$. Finally, by testing all possibilities, we find that 4 is not academic either.