Find all positive integers $n>1$ with the following property:

for each two positive divisors $k, \ell<n$ of $n$, at least one of the numbers $2 k-\ell$ and $2 \ell-k$ is a (not necessarily positive) divisor of $n$ as well.

#
If $n$ is prime, then $n$ has the desired property: if $k, \ell2$ (since we already discussed the case $m-2=2$ ). We have $m=p+2$, hence $n=p(p+2)$. Applying the condition in the problem to the pair $(k, \ell)=(1, p)$, we get that $p-2$ or $2 p-1$ divides $n$. If $p-2$ divides $n$, we must have $p=3$ since $p$ is the smallest prime divisor of $n$. If $2 p-1$ divides $n$, we must have $p+2=2 p-1$, since $p+2 \leq 2 p-1<p(p+2)$ and $p+2$ and $p(p+2)$ are the biggest positive divisors of $n$. Therefore $p=3$ in both cases, and we get $n=15$ as a candidate.
- If finally $m-2=2 p$ we have $m=2 p+2$, so $n$ is even. Hence $p=2$ and $n=12$.

We conclude that if a composite number $n$ satisfies the condition in the problem statement, then $n \in\{6,8,9,12,15\}$. Choosing $(k, \ell)=(1,2)$ shows that $n=8$ does not work; choosing $(k, \ell)=(3,6)$ shows that 12 is not a solution. It is easy to check that $n=6, n=9$ and $n=15$ have the desired property by checking the condition for all possible pairs $(k, \ell)$.

We conclude that the solutions are given by the prime numbers, $n=6, n=9$ and $n=15$.

#