Sum of $\lfloor k^{1/3} \rfloor$

I am faced with the following sum:

$$\sum_{k=0}^m \lfloor k^{1/3} \rfloor$$

Where $m$ is a positive integer. I have determined a formula for the last couple of terms such that $\lfloor n^{1/3} \rfloor^3 = \lfloor m^{1/3} \rfloor^3$. For example if the sum is from 0 to 11 I can find the sum of the terms 8 through 11. I am stuck on what formula can be applied to find the sum of the terms before the final stretch however.

Solutions Collecting From Web of "Sum of $\lfloor k^{1/3} \rfloor$"

You have
\sum_{k=0}^m \lfloor k^{1/3} \rfloor &= \sum_{i=0}^{\lfloor m^{1/3} \rfloor} i |\{0 \leq k \leq m : \lfloor k^{1/3} \rfloor = i\}| \\ &=
\sum_{i=0}^{\lfloor m^{1/3} \rfloor} i |\{0 \leq k \leq m : i^3 \leq k < (i+1)^3\}| \\ &=
\sum_{i=0}^{\lfloor m^{1/3} \rfloor-1} i((i+1)^3-i^3) + \lfloor m^{1/3} \rfloor (m-\lfloor m^{1/3} \rfloor^3+1) \\ &=
\sum_{i=0}^{\lfloor m^{1/3} \rfloor-1} (3i^3+3i^2+i) + \lfloor m^{1/3} \rfloor (m-\lfloor m^{1/3} \rfloor^3+1) \\ &=
\frac{1}{4}(\lfloor m^{1/3} \rfloor-1)\lfloor m^{1/3} \rfloor^2(3\lfloor m^{1/3} \rfloor+1) + \lfloor m^{1/3} \rfloor (m-\lfloor m^{1/3} \rfloor^3+1).

Note: This answer provides a solution for the general case $\lfloor \sqrt[p]{k}\rfloor$ with $p\geq 1$.

The following is valid for $m\geq 1, p\geq 1$

\sum_{k=1}^{m}\lfloor \sqrt[p]{k}\rfloor
=m\lfloor \sqrt[p]{m}\rfloor^{p+1}
-\frac{1}{p+1}\sum_{j=0}^{p}\binom{p+1}{j}B_j\lfloor \sqrt[p]{m}\rfloor^{p+1-j}+m\lfloor \sqrt[p]{m}\rfloor\tag{1}

with $B_j$ the $j$-th Bernoulli Number.

The special cases $p=1,2,3$ give

\sum_{k=1}^m\lfloor k\rfloor&=\frac{1}{2}m^2+\frac{1}{2}m\\
\sum_{k=1}^m\lfloor \sqrt{k}\rfloor&=
\sum_{k=1}^m\lfloor \sqrt[3]{k}\rfloor&=m\lfloor\sqrt[3]{m}\rfloor-\frac{1}{4}\lfloor\sqrt[3]{m}\rfloor^4

For convenient calculations we consider two aspects:

  • We introduce a variable $a=\lfloor\sqrt[p]{m}\rfloor$. So, we have
    $$a\leq \sqrt[p]{m} < a+1$$
  • We use the Iverson Bracket notation, so we can replace the expression $\lfloor x\rfloor$ by
    $$\lfloor x\rfloor=\sum_{j\geq 0}[1\leq j \leq x]$$

Special case: $m=a^p,a=\lfloor\sqrt[p]{m}\rfloor$

We start the calculation by conveniently assuming $m=a^p$. We obtain
\sum_{k=1}^{m}\lfloor\sqrt[p]{k}\rfloor&=\sum_{k=1}^m\sum_{j\geq 0}[1\leq j \leq \sqrt[p]{k}][0\leq k \leq a^p]\\
&=\sum_{j=1}^{a}\sum_{k=1}^{m}[j^p\leq k \leq a^p]\\


  • In (3) we use the known representation of the sum of $p$-th powers of natural numbers by the Bernoulli Numbers


General case: $m\geq a^p,a=\lfloor\sqrt[p]{m}\rfloor$

In the general case we let again $a=\lfloor\sqrt[p]{m}\rfloor$ and have additionally to consider the terms for
$a^p< k \leq m$.
They are all equal to $a$, so they sum up to $$(m-a^p)a.$$ Adding this to (4) we get the general formula with $a=\lfloor \sqrt[p]{m}\rfloor$


Let’s finally compute the special case $p=3$. We need the Bernoulli numbers $B_0=1, B_1=\frac{1}{2}, B_2=\frac{1}{6}$ and $B_3=0$.


The other cases ($k=1,2$) from the claim (2) follow similarly.

Note: This approach ($k=2$) can be found in Concrete Mathematics by R.L. Graham, D.E. Knuth and O. Patashnik.