Is every natural number representable as $\sum\limits_{k=1}^{n} \pm k^3$?

Solution 1:

You will have to look a bit farther. A similar identity to the one you cite: $$(n+7)^3-(n+6)^3-(n+5)^3+(n+4)^3-(n+3)^3+(n+2)^3+(n+1)^3-n^3=48$$ means we just need to solve the problem for $[-23,24]$ and because the exponent is odd we can consider opposite signs equivalent. Because the cubes are spaced further than the squares it will probably take a bunch of searching to fill in all of $[1,24]$. Of course, $1,7,9,18,20$ are easy.

Solution 2:

Consider this an addendum to Ross's answer. Found by a Python script which ran while I dined.

$1 = 1^3$ (at least 7 other ways)

$2 = 1^3 - 2^3 + 3^3 - 4^3 + 5^3 + 6^3 + 7^3 - 8^3 - 9^3 + 10^3 + 11^3 - 12^3$ (at least 12 other ways)

$3 = 1^3 - 2^3 + 3^3 + 4^3 + 5^3 + 6^3 - 7^3 + 8^3 - 9^3 + 10^3 - 11^3 - 12^3 + 13^3$ (at least 6 other ways)

$4 = -1^3 - 2^3 + 3^3 + 4^3 - 5^3 + 6^3 + 7^3 - 8^3$ (at least 18 other ways)

$5 = -1^3 + 2^3 + 3^3 - 4^3 + 5^3 - 6^3 + 7^3 + 8^3 - 9^3$ (at least 6 other ways)

$6 = 1^3 - 2^3 + 3^3 + 4^3 - 5^3 + 6^3 + 7^3 - 8^3$ (at least 14 other ways)

$7 = -1^3 + 2^3$ (at least 12 other ways)

$8 = 1^3 + 2^3 - 3^3 + 4^3 - 5^3 + 6^3 + 7^3 - 8^3 - 9^3 + 10^3 - 11^3 - 12^3 + 13^3 - 14^3 + 15^3$ (at least 12 other ways)

$9 = 1^3 + 2^3$ (at least 13 other ways)

$10 = 1^3 + 2^3 + 3^3 - 4^3 + 5^3 - 6^3 - 7^3 + 8^3 + 9^3 - 10^3 + 11^3 + 12^3 - 13^3 + 14^3 - 15^3$ (at least 16 other ways)

$11 = 1^3 + 2^3 - 3^3 + 4^3 - 5^3 + 6^3 - 7^3 - 8^3 + 9^3$ (at least 5 other ways)

$12 = -1^3 - 2^3 - 3^3 - 4^3 + 5^3 + 6^3 - 7^3 + 8^3 - 9^3 - 10^3 + 11^3$ (at least 15 other ways)

$13 = -1^3 + 2^3 + 3^3 - 4^3 - 5^3 + 6^3 + 7^3 - 8^3 - 9^3 + 10^3 - 11^3 + 12^3 + 13^3 - 14^3$ (possibly other ways)

$14 = 1^3 - 2^3 - 3^3 - 4^3 + 5^3 + 6^3 - 7^3 + 8^3 - 9^3 - 10^3 + 11^3$ (at least 9 other ways)

$15 = -1^3 + 2^3 - 3^3 - 4^3 - 5^3 - 6^3 - 7^3 + 8^3 - 9^3 + 10^3$ (at least 1 other way)

$16 = 1^3 - 2^3 - 3^3 - 4^3 + 5^3 - 6^3 - 7^3 - 8^3 + 9^3 - 10^3 + 11^3$ (at least 10 other ways)

$17 = 1^3 + 2^3 - 3^3 - 4^3 - 5^3 - 6^3 - 7^3 + 8^3 - 9^3 + 10^3$ (at least 6 other ways)

$18 = -1^3 - 2^3 + 3^3$ (at least 17 other ways)

$19 = 1^3 - 2^3 - 3^3 + 4^3 - 5^3 + 6^3 - 7^3 + 8^3 + 9^3 - 10^3$ (at least 8 other ways)

$20 = 1^3 - 2^3 + 3^3$ (at least 19 other ways)

$21 = 1^3 + 2^3 + 3^3 + 4^3 + 5^3 - 6^3 - 7^3 - 8^3 + 9^3 + 10^3 - 11^3 - 12^3 + 13^3$ (at least 5 other ways)

$22 = 1^3 + 2^3 + 3^3 + 4^3 - 5^3 + 6^3 + 7^3 - 8^3$ (at least 10 other ways)

$23 = 1^3 + 2^3 + 3^3 + 4^3 - 5^3 - 6^3 + 7^3 + 8^3 - 9^3 + 10^3 - 11^3 - 12^3 + 13^3$ (at least 5 other ways)

$24 = 1^3 + 2^3 - 3^3 - 4^3 + 5^3 + 6^3 - 7^3 + 8^3 + 9^3 + 10^3 - 11^3 + 12^3 + 13^3 + 14^3 - 15^3 - 16^3$ (at least 7 other ways)

Each of the above representations is the shortest possible. The algorithm created a sequence of sets $S_n$ with $S_0 = \{0\}$ and $S_n = \{x+n^3, x-n^3 : x \in S_{n-1}\}$ for $n > 0$, so that $S_1 = \{1, -1\}$, $S_2 = \{9, -7, 7, -9\}$, etc. The algorithm also kept track of the sequence of signs used to arrive at each particular number.

Solution 3:

For 5th powers, there is an identity,

$$\sum\limits_{k=1}^{168}\pm(x+k)^5 = 480$$

analogous to the 3d powers mentioned by R. Millikan in his answer.

What remains to be shown is that all $0\leq N<240$ can be decomposed into sums of fifth powers. See this post.

(P.S. The number of addends can be reduced to just $m=168$.)