# Number writable as sum of cubes in $9$ “consecutive” ways

Let's say that a given $n\in\mathbb{N}$ is writable as sum of cubes in $k$ consecutive ways if it can be written as sum of $j,j+1,\ldots, j+(k-1)$ nonzero cubes, for some $j\geqslant 1$.

For example, $26$ is writable as sum of squares in $4$ consecutive ways, for \begin{align} 26 &= 1+25 &&\text{($2$ squares)}\\ 26 &= 1+9+16 &&\text{($3$ squares)}\\ 26 &= 4+4+9+9 &&\text{($4$ squares)} \\ 26 &= 1+1+4+4+16 &&\text{($5$ squares)} \end{align}

I'm trying to show that there is $n\in\mathbb{N}$ such that $n$ is writable as sum of cubes in $9$ consecutive ways, i.e. that there is $j\geqslant 1$ such that $n$ is the sum of $j,j+1,\ldots,j+8$ cubes.

I'm using that every number can be written as sum of $9$ or fewer cubes. (Or at least that there is some $g(3)\in\mathbb{N}$ such that every number is the sum of $g(3)$ or fewer cubes. I prefer this one because this problem seems to ask to be generalized to Waring bases $P_k=\{n^k:n\in\mathbb{N}\}$ in general.)

The example I found for $26$ for the case of squares was calculated manually, but I believe that there must be some general strategy to tackle this problem. I'm not much interested in to find an specific $n$ that is sum of cubes in $9$ consecutive ways, but in the method of finding one (if there is such).

I believe it holds for any $k$ in any Waring basis, but the case of cubes for $k=9$ would be good enough haha.

Any hints and tips would be much appreciated!

• $n=1072$ is a sum of $2,3,4,...,20$ cubes, as I found out with PARI/GP , but I do not have an idea for a concrete construction. – Peter Nov 3 '15 at 0:06
• @Peter That's nice! I found the $n=26$ for squares using Python. I suspect that there must some kind of pattern in the representations of such numbers. Anyway, if this pattern exists it must be nontrivial, for if $n$ is the least number writable as sum of cubes in $9$ (or $19$) consecutive ways, then no cube appears in all $9$ (or $19$) representations (otherwise there would be a smaller number with this property). – Alufat Nov 3 '15 at 0:12
• @Peter Oh, but are you considering negative cubes?? – Alufat Nov 3 '15 at 0:15
• @Peter Wow o.O, $1072$ must be a really amazing number then hahaha. Would you mind post these representations as an answer? I'm really curious!! (and a bit too lazy to open Python right now :P) – Alufat Nov 3 '15 at 0:20
• @vadim123 Maybe it's special in that it begins with 2. (Fermat guarantees that it can't begin with 1, since no cube is the sum of two cubes.) – Akiva Weinberger Nov 3 '15 at 1:43

$1072$ represented by the sum of $k$ cubes $k=2,...,30$

? n=1072;s=10;for(k=2,30,gef=0;forvec(z=vector(k,m,[1,s]),if(gef==0,if(sum(j=1,k
,z[j]^3)==n,gef=1;print(k,"    ",z))),1))
2    [7, 9]
3    [2, 4, 10]
4    [1, 6, 7, 8]
5    [1, 1, 5, 6, 9]
6    [1, 3, 4, 5, 7, 8]
7    [1, 1, 1, 5, 6, 6, 8]
8    [1, 2, 2, 4, 6, 6, 6, 7]
9    [1, 1, 1, 2, 5, 5, 5, 7, 7]
10    [1, 1, 1, 1, 1, 1, 1, 1, 4, 10]
11    [1, 1, 1, 1, 2, 2, 2, 4, 5, 7, 8]
12    [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 10]
13    [1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 7, 7, 7]
14    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 10]
15    [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 6, 6, 6, 7]
16    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 7, 7]
17    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 8, 8]
18    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 5, 7, 8]
19    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 10]
20    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 7, 7, 7]
21    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 10]
22    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 6, 6, 6, 7]
23    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 5, 6, 7, 7]
24    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 8, 8]
25    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5, 7, 8
]
26    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3
, 10]
27    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 6
, 6, 8]
28    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 5
, 5, 6, 8]
29    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2
, 2, 2, 8, 8]
30    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 4, 4, 4, 7, 8]

• That's a really strange property at first sight haha. Thanks! :D – Alufat Nov 3 '15 at 0:27
• Alas, Fermats last theorem forbids a cube being the sum of two cubes :( So, a cube cannot have this property. – Peter Nov 3 '15 at 0:31

For $k=31,...,38$, there are still representations :

? n=1072;s=10;for(k=31,40,gef=0;forvec(z=vector(k,m,[1,s]),if(gef==0,if(sum(j=1,
k,z[j]^3)==n,gef=1;print(k,"    ",z))),1))
31    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 4, 4, 4, 5, 9]
32    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 4, 5, 7, 8]
33    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 2, 2, 3, 10]
34    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 2, 3, 3, 4, 4, 7, 8]
35    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 4, 5, 5, 6, 8]
36    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 2, 2, 8, 8]
37    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 2, 3, 3, 5, 5, 9]
38    [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 10]

• I posted another answer because the of the overview . – Peter Nov 3 '15 at 0:43
• I'm really confused HAHAHA. Either it's a common property among large integers or $1072$ is a VERY special number. I'll continue to seek for a general solution, but your answer was far more satisfactory then I expected xD – Alufat Nov 3 '15 at 0:48
• The situation becomes much more interesting, if we only consider representation without repeating cubes. I am currently searching $k=51$ and did not find a representation so far ... – Peter Nov 3 '15 at 0:55