Let $n$ be a integer and let $n=d_1>d_2>\cdots>d_k=1$ its positive divisors. a) Prove that $$d_1-d_2+d_3-\cdots+(-1)^{k-1}d_k=n-1$$iff $n$ is prime or $n=4$. b) Determine the three positive integers such that $$d_1-d_2+d_3-...+(-1)^{k-1}d_k=n-4.$$
Problem
Source: Problem 4, Brazilian MO 2015
Tags: number theory proposed, number theory
suli
21.10.2015 06:30
If $n$ is prime or $4$ the problem is trivial. If $n$ is not prime or 4, then $n$ has at least three divisors, so $d_2, d_3$ exist. Notice that
$$n - 1 = d_1 - d_2 + d_3 - \dots + (-1)^{k-1} d_{k-1} \le n - (d_2 - d_3) - \dots,$$so $d_2 = d_3 + 1$. If $d_2 = 2$ then $n = 4$, contradiction. If $d_2 = 3$ then $n = 6$, which doesn't satisfy the condition. If $d_2 \ge 4$, then one of $d_2, d_3$ is not prime, which means $n$ has at least six factors because $d_2, d_3$ are relatively prime. Thus $d_1 - d_2 + d_3 - \dots + (-1)^{k-1} (k-1) \le n-2$, contradiction, so we are done.
The three integers are $6, 10, 12$. If $n$ has more than $10$ factors, then $d_1 - d_2 + d_3 - \dots + (-1)^{k-1} \le n - (d_2 - d_3) - (d_4 - d_5) - (d_6 - d_7) - (d_8 - d_9) - (d_10 - d_11) \le n-5$, contradiction. Thus $n$ has at most $10$ factors and so we only have to consider $n$ with at most $10$ factors. This is easily taken care of with some casework.
Seventh
21.10.2015 17:16
For b), I think that $6$ doesn't work: $6-3+2-1\ne2$.
yunxiu
23.10.2015 11:04
n=10,12,25 satisfies the condition.
pablock
24.08.2017 01:06
a) $d_2-d_3+...+(-1)^kd_k=1$. Since $d_2-d_3+d_4 \ge 2$, $n$ has 2 or 3 divisors. In the first case, $n$ is prime and it works. If $n$ has 3 divisors, $n=p^2$, where $p$ is prime. So $p^2-p+1=p^2-1 \iff p=2$, then $n=4$. b) $d_i-d_{i+1} \ge 1$, so $k \le 10$. We immediately exclude 1, 2, 5 and 7 of the set of possible values of $k$. By casework, we get $n=10$, $n=12$ and $n=25$.