# Show that a number $n$ is divisible by 6 if and only if it can be written as a sum of three distinct divisors.

If $$6|n$$ then $$n=6k=3k+2k+k$$. And $$3k|n$$, $$2k|n$$ and $$k|n$$.

Now let $$p,q$$ and $$r$$ be three distinct divisors of $$n$$ so that :

$$n=p+q+r$$

Because $$p|n$$, $$q|n$$ and $$r|n$$ I figured that $$p|q+r$$, $$q|p+r$$ and $$r|p+q$$.

I tried to prove that n is even or a multiple of 3 but without much luck.

How can I prove the statement?

• I think the converse is not true. Take any three odd primes and sum them up. (say $3, 5, 7$). Their sum is an odd number and never divisible by $6$. – user1952500 Apr 22 at 21:31
• Yes, but their sum ($15$ in your example) being $n$ is not divisible by all three of the alleged divisors ($7$ in your example does not divide $15$). – Mark Fischler Apr 22 at 21:52

Your first line demonstrates that $$6|n \implies \exists (a,b,c) : (n = a + b + c) \wedge (a|n \wedge b|n \wedge c|n)$$ which is the "only if" part -- six divides $$n$$ only if $$n$$ can be written as the sum of three divisors. So we must now take care of the "if" part.

So assume (hypothesis of the "if" clause") $$\exists (a,b,c) : (n = a + b + c) \wedge (n = pa \wedge n = qb \wedge n = rc)$$. Then $$\frac{n}{a} = 1 + \frac{b}{a}+ \frac{c}{a} = 1+ \frac{n}{qa}+ \frac{n}{ra} \\ \frac1{a}=\frac{1}{n}+\frac{1}{qa}+\frac1{ra}=\frac{1}a \left( \frac{1}{p}+\frac{1}{q}+\frac1{r} \right) \\ \frac{1}{p}+\frac{1}{q}+\frac1{r} = 1$$ with $$p,q,r$$ positive integers.

Then at least one of $$(p,q,r)$$ must be less than or equal to $$3$$ because $$\frac14+\frac14+\frac14 < 1$$. One might consider $$p=q=r=3$$, but then $$n$$ does not have three distinct divisors. Sb one of them needs to be $$2$$; without loss of generality we can take $$p=2$$. Then $$\frac{1}{2}+\frac{1}{q}+\frac1{r} = 1 \implies \frac{1}{q}+\frac1{r} =\frac12$$

So at least one of $$(q,r)$$ must be less than or equal to $$4$$ because $$\frac15+\frac15 < \frac12$$. $$q = \frac14$$ does not work because that would give $$r = \frac14 = q$$ and again they are not distinct. Thus $$q=3$$, and that implies that $$r=6$$. So $$n = 2a = 3b = 6c$$. But $$n = 6c \implies 6|n$$ which is what we were trying to prove.

Without, loss of generality, presume that $$p > q > r$$. Observe that $$p|(q+r) \implies (q+r) = k_1 p \implies 1 \le k_1 = \frac{q+r}{p} < 2 \implies k_1 =1.$$ As such, $$p = q+r$$, and $$n = 2(q+r)$$. Since $$q|n=2(q+r)$$, we have $$q|2r$$. That is, $$2r = k_2 q \implies 1 \le k_2=\frac{2r}{q}<2 \implies k_2 = 1.$$ Therefore, $$q = 2r \implies p = q+r =3r \implies n = 6r.$$