0
$\begingroup$

I have two questions:

  1. I wonder how to check if an integer $n$ can be represented as:

$$n = \sum_{k=1}^{m}k^3$$

  1. And if it can be decomposed this way, how to find $m$?

I tried to user an integral approximation like this: $k = \sqrt[3]{4x}$, but it is not correct, because I need an accurate (descrete) answer.

$\endgroup$
  • 1
    $\begingroup$ Related Numberphile video. $\endgroup$ – Shaun Apr 5 at 15:17
  • $\begingroup$ $k = \sqrt[4]{4x}$ rounded down would be better and $k=\sqrt{\sqrt{4x}+\frac14}-\frac12$ much better $\endgroup$ – Henry Apr 5 at 15:25
  • $\begingroup$ @Henry how on Earth did you find that second k? :) $\endgroup$ – Nikita Hismatov Apr 5 at 15:27
  • $\begingroup$ It is a solution to $x=\frac14n^2(n+1)^2$ $\endgroup$ – Henry Apr 5 at 15:39
1
$\begingroup$

Since $$\sum\limits_{k=0}^m k^3=\left(\frac{m(m+1)}{2}\right) ^2$$ (you can easily prove this by induction), $n$ necessarily has to be a perfect square $i^2$ because $\frac{m(m+1)}{2}\in\mathbb{N}$. Then we have $$m(m+1)=2i\Leftrightarrow m^2+m-2i=0.$$ If this equation has a positive integer root $m_1$, then $$\sum\limits_{k=0}^{m_1} k^3=n.$$ If such a root does not exist, the number $n$ cannot be represented in the desired way.

$\endgroup$
-1
$\begingroup$

$n$ must be the square of a triangular number.

I.e. it must be a perfect square,

$$(\lfloor\sqrt{n}\rfloor)^2=n,$$

and $$(m(m+1))^2=4n,$$

where

$$m=\lfloor\sqrt[4]{4n}\rfloor.$$

$\endgroup$
  • 1
    $\begingroup$ Is it from number theory? $\endgroup$ – Nikita Hismatov Apr 5 at 15:25
  • $\begingroup$ @NikitaHismatov: no, simple algebra. $\endgroup$ – Yves Daoust Apr 5 at 15:33
  • 1
    $\begingroup$ @NikitaHismatov: I have added the value of $m$. $\endgroup$ – Yves Daoust Apr 5 at 15:36
  • 1
    $\begingroup$ Stupid downvote. This is the only answer that says how to test $n$ and compute $m$. $\endgroup$ – Yves Daoust Apr 9 at 15:30
-1
$\begingroup$

Just to show how to prove the formula $\sum_{k=1}^n k^3=\frac14n^2(n+1)^2$ with no previous knowledge.

Let $f:\Bbb R\to \Bbb R$ be a function such that $f(x)=f(x-1)+x^3$ and $f(0)=0$. Assume for the moment that $f$ is a polynomial of degree $4$ like $f(x)=ax^4+bx^3+cx^2+dx$ (note that since $f(0)=0$, $f$ has no constant term).

Then $$ax^4+bx^3+cx^2+dx=a(x-1)^4+b(x-1)^3+c(x-1)^2+d(x-1)+x^3$$ So $$b=-4a+b+1$$ $$c=6a-3b+c$$ $$d=-4a+3b-2c+d$$ It is a triangular system. Solve it and you are almost done.

Now that you have the formula, you can prove it by induction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.