Perfect Number which is Sum of Equal Powers of Two Numbers

Theorem
$28$ is the only perfect number which is the sum of equal powers of exactly $2$ positive integers:
 * $28 = 1^3 + 3^3$

Proof
Let $N$ be an even perfect number which is the sum of equal powers of exactly $2$ positive integers.

By Theorem of Even Perfect Numbers, write:
 * $N = 2^{p - 1} \paren {2^p - 1} = a^n + b^n$

where $p, 2^p - 1$ are prime, $a, b, n \in \Z_{>0}$, $n > 1$.

, let $a \le b$.

Immediately we see that $a \ne b$:

$a = b$.

We have:
 * $2^{p - 1} \paren {2^p - 1} = 2 a^n$

In particular:
 * $\paren {2^p - 1} \divides a^n$

By Prime Divides Power:
 * $\paren {2^p - 1}^n \divides a^n = 2^{p - 2} \paren {2^p - 1}$

which leads to a contradiction, since $n > 1$.

Next, since:
 * $2^p - 1 \equiv 3 \pmod 4$

by Integer as Sum of Two Squares, $N$ is not a sum of two squares.

This leads to $n$ being odd, and $n \ge 3$.

By Sum of Two Odd Powers:
 * $\paren {a + b} \divides \paren {a^n + b^n} = N$

Suppose $\paren {2^p - 1} \divides \paren {a + b}$.

We have:

If $(*)$ holds, this is a contradiction.

Since $b > a > 0$, we have:
 * $b \ge 2$

Hence for $n \ge 5$:
 * $b^n \ge b^5 \ge 8 b^2 \ge 4 b^2$

so $(*)$ holds.

For $n = 3$ and $b \ge 4$:
 * $b^3 \ge 4 b^2$

so $(*)$ holds.

We only need to inspect the cases:
 * $n = 3$, $2 \le b \le 3$, $a^3 + b^3$ is even.

This leads to the only case:
 * $1^3 + 3^3 = 28$

Now suppose that $\paren {2^p - 1} \nmid \paren {a + b}$.

Then $a + b = 2^k$ for some $k \le p - 1$.

As $0 < a < b$, we have:
 * $a + b \ge 3$

Hence $a, b$ are either both odd or both even.

Suppose they are both odd.

By Sum of Two Odd Powers:
 * $\ds a^n + b^n = \paren {a + b} \sum_{j \mathop = 0}^{n - 1} \paren {-1}^j a^{n - j - 1} b^j$

Each $\paren {-1}^j a^{n - j - 1} b^j$ is odd, and there are $n$ of them.

Therefore $\ds \sum_{j \mathop = 0}^{n - 1} \paren {-1}^j a^{n - j - 1} b^j$ is odd.

The only odd divisors of $N$ are $1$ and $2^p - 1$.

Since $a^n + b^n > a + b$:
 * $\ds \sum_{j \mathop = 0}^{n - 1} \paren {-1}^j a^{n - j - 1} b^j = 2^p - 1$

Therefore $a + b = 2^{p - 1}$.

We have:

If $(*)$ holds, this is a contradiction.

Since $b > a > 0$, we have:
 * $b \ge 2$

Hence for $n \ge 5$:
 * $b^n \ge b^5 \ge 8 b^2$

so $(*)$ holds.

For $n = 3$ and $b \ge 8$:
 * $b^3 \ge 8 b^2$

so $(*)$ holds.

We only need to inspect the cases:
 * $n = 3$, $2 \le b \le 7$, both $a$ and $b$ are odd, $a + b$ is a power of $2$.

This leads to the cases:

Finally, suppose they are both even.

Let $2^m$ be the largest power of $2$ that divides both $a$ and $b$, where $m \ge 1$.

Write $s = \dfrac a {2^m}$ and $t = \dfrac b {2^m}$.

Then:
 * $s + t = 2^{k - m}$
 * $s^n + t^n = 2^{p - 1 - m n} \paren {2^p - 1}$

At least one of $s, t$ is odd.

If the other is even, then $2^{k - m}$ is odd.

This forces $2^{k - m} = 1 = s + t$, which contradicts $a, b > 0$.

Hence $s, t$ are both odd.

By our previous analysis:
 * $s + t = 2^{p - 1 - m n}$

Hence: