# Solving the number theoretic equation $\sum_{d|n}{d^4}=n^4+n^3+n^2+n+1$

I found an interesting problem:

Find all $n\in\mathbb N$ such that $$\sum_{d|n}{d^4}=n^4+n^3+n^2+n+1$$ If we define $s(n)=\sum_{d|n}{d^4}$, we can show, that $s(mn)=s(m)s(n)$ if $\gcd(m,n)=1$.

Thus for $n=\prod_{k=1}^{r}p_k^{\alpha_k}$: $$s(n)=\prod_{k=1}^{r}\frac{p_k^{4\alpha_k+4}-1}{p_k^4-1}$$ Where the $p_i$ are prime. Thus, the problem is equivalent to solving: $$\prod_{k=1}^{r}\left(\frac{p_k^{4\alpha_k+4}-1}{p_k^4-1}\right)=\frac{\left(\prod_{k=1}^{r}p_k^{5\alpha_k}\right)-1}{\left(\prod_{k=1}^{r}p_k^{\alpha_k}\right)-1}$$ Does this help?

I have a feeling that the only solutions are $p^4$ where $p$ is prime, because it seems that if $n$ has more than one prime divisor, then $s(n)>n^4+n^3+n^2+n+1$. Is this true?

Edit:

As pointed out in the answer of @Will Jagy, the conjectured inequality doesn't hold generally if the number of distinct prime divisors is greater than one, but I think it is true if the number of distinct prime divisors is greater than or equal to $4$. Is this true? Can we solve it by considering different values of the number of distinct prime divisors of $n$?

• CAS seems to suggest that the solution is of the form $n = p^4$ for a prime $p$, though I have to think about the proof. – Sangchul Lee Aug 17 '15 at 17:26

We introduce two functions $\sigma_4$ and $\Delta$ as follows:

$$\sigma_4(n) = \sum_{d\mid n} d^4 \quad \text{and} \quad \Delta(n) = \sigma_4(n) - (1+n+n^2+n^3+n^4).$$

Then we make the following simple observations:

Lemma 1. Let $p$ be a prime. Then (1) $\Delta(p^e) < 0$ iff $e < 4$, and (2) $\Delta(p^e) = 0$ iff $e = 4$.

Proof. This is straightforward from

$$\Delta(p^e) = \frac{p^{4e} - 1}{p^4 - 1} - \frac{p^{4e} - 1}{p^e - 1}.$$

Lemma 2. If $\Delta(n) = 0$, then any odd prime factor of $n$ appears even times.

Proof. Write $n = \prod_{i=1}^{\infty} p_i^{e_i} = 2^{e_1} 3^{e_2} 5^{e_3} \cdots$, where $p_i$ is the $i$-th smallest prime. On the one hand,

$$1 + n + n^2 + n^3 + n^4 \equiv 1 \pmod{2}.$$

On the other hand, treating the case $p_1 = 2$ and the others separately, we easily see that

$$\sigma_4(n) \equiv \prod_{i=2}^{\infty}(1 + e_i) \pmod{2}.$$

Comparing two equations gives us $e_i \equiv 0 \pmod{2}$ for $i \geq 2$.

Lemma 3. Suppose that we can write $n = ab$ with $a, b > 1$ and $\gcd(a, b) = 1$. If $\Delta(n) = 0$ holds, then $\Delta(a), \Delta(b) < 0$.

Proof. By symmetry, we only need to prove that $\Delta(a) < 0$. Write

$$0 = \Delta(n) = \Delta(a)\sigma_4(b) + \sum_{i=0}^{4} a^i(\sigma_4(b) - b^i).$$

Since the summation term of the RHS is positive if $b > 1$, we must have $\Delta(a) < 0$.

Proposition. If $\Delta(n) = 0$, then $n = p^4$ for some prime $p$.

Proof. Assume that $\Delta(n) = 0$. If $n$ has exactly one prime factor, then the conclusion is clear from Lemma 1. So it suffices to show that $n$ cannot have more than one prime factor.

To this end, assume otherwise. On the one hand, write $n = \prod_{i=1}^{\infty} p_i^{e_i}$. Then by Lemma 1—3, we have $e_1 < 4$ and $e_i = 0 \text{ or } 2$ for all $i \geq 2$. That is,

• $2$ can appear in $n$ at most 3 times, and
• Any odd prime factor of $n$ appears in $n$ exactly 2 times.

On the other hand, if $p, q$ are distinct primes, then

$$\Delta(p^2 q^2) = (p^4 q^4 + 1)(p^4 - p^2 q^2 + q^4) + p^8 + q^8 > 0.$$

Together with Lemma 3, this means that $n$ is either $n = 2p^2$ or $n = 8p^2$ for some odd prime $p$. In this case, however, for $p \neq 3$ we have

$$0 \equiv \sigma_4(n) \not\equiv 1 + n + n^2 + n^3 + n^4 \equiv 1 \pmod{3}.$$

Finally, $\Delta(18) \neq 0$ and $\Delta(72) \neq 0$ are easily checked, completing the proof. ////

I am not satisfied with the last part of the proof, and would like to see if my argument can be improved.

• Consider $\sigma_4(n) - n^4 - 1$. Suppose $\Delta(n) = 0$. Let $p$ be the smallest prime factor of $n$. Then $1 < \frac{n}{p} < n$, so $\bigl(\frac{n}{p}\bigr)^4 \leqslant n^3+n^2+n$. Divide by $n^4$, you get $$\frac{1}{p^4} \leqslant \frac{1}{n} + \frac{1}{n^2} + \frac{1}{n^3} < \frac{1}{n-1}.$$ Thus $n - 1 < p^4$. If we had $n \neq p^4$, then $n < p^4$. Thus $n$ is the product of at most three primes. And we know it's not a power of $p$. If we had $n = pq$ or $n = p^2q$ or $n = pqr$, then $\sigma_4(n)$ is even, but $n^4+n^3+n^2+n+1$ is odd. The same argument holds if $n = pq^2$ with odd $p$. – Daniel Fischer Aug 17 '15 at 23:55
• The case $n = 2q^2$ remains. But then $\sigma_4(n) \equiv 1 + 2^4 \pmod{q}$ while $n^4+n^3+n^2+n+1\equiv 1 \pmod{q}$. – Daniel Fischer Aug 17 '15 at 23:55
• @DanielFischer, Thank you for a concise and nice solution! Contest-level number theory problems is always hard for me. :s – Sangchul Lee Aug 18 '15 at 0:12