# Is $k=3$ the only solution to $\sum_{r=1}^n r^k =\left( \sum_{r=1}^nr^1 \right)^2$?

$f(k) = \sum_{r=1}^{n} r^k$. Find an integer $x$ that solves the equation $f(x) = \bigl(f(1)\bigr)^2$.

Problem credit: http://cotpi.com/p/2/

I understand why $x = 3$ is a solution. $1^3 + 2^3 + \dots + n^3 = \left(\frac{n(n + 1)}{2}\right)^2 = (1 + 2 + \dots + n)^2$. But how can we prove that there is no other solution?

Will we have other solutions if $x$ is real? What if $x$ is complex?

-
(Note: the title had its variables wrong in the sum limit and the expressions. I've fixed it to match the question.) – Steven Stadnicki May 24 '12 at 22:36

At least for real x, f(x) for a given n increases with x. So there can be only one solution at most. Since 3 is a solution, there is no other.

-

More generally, one can look for expressions of the form $f(k) = \sum_{j=1}^{\lfloor(n-1)/2\rfloor} a_j f(j) f(n+1-j)$. It seems to work for all odd $k$. For example:

\eqalign{f \left( 3 \right) &= \left( f \left( 1 \right) \right) ^{2}\cr f \left( 5 \right) &=4\,f \left( 1 \right) f \left( 3 \right) -3\, \left( f \left( 2 \right) \right) ^{2}\cr f \left( 7 \right) &=6\,f \left( 1 \right) f \left( 5 \right) -15\,f \left( 2 \right) f \left( 4 \right) +10\, \left( f \left( 3 \right) \right) ^{2}\cr f \left( 9 \right) &=8\,f \left( 1 \right) f \left( 7 \right) -28\,f \left( 2 \right) f \left( 6 \right) +56\,f \left( 3 \right) f \left( 5 \right) -35\, \left( f \left( 4 \right) \right) ^{2}\cr f \left( 11 \right) &=10\,f \left( 1 \right) f \left( 9 \right) -45\,f \left( 2 \right) f \left( 8 \right) +120\,f \left( 3 \right) f \left( 7 \right) -210\,f \left( 4 \right) f \left( 6 \right) +126\, \left( f \left( 5 \right) \right) ^{2}\cr }

Hmm, looks like $$f(2k+1) = \frac{1}{2}\sum_{j=1}^{2k-1} (-1)^{j+1} {2k \choose j} f(j) f(2k-j)$$

Ought to be easy to prove...

EDIT: yes, it is. By the binomial theorem

$$\sum_{j=1}^{2k-1} \sum_{q=1}^n \sum_{r=1}^n (-1)^{j+1} {2k \choose j} q^j r^{2k-j} = \sum_{q=1}^n \sum_{r=1}^n \left(r^{2k} + q^{2k} - (r-q)^{2k}\right)$$ and note that $$\sum_{q=1}^n \sum_{r=1}^n (r-q)^{2k} = \sum_{s=1}^n 2 (n-s) s^{2k} = 2 n f(2k) - 2 f(2k+1)$$

-

Hint: If $n\in\mathbb{N}$, $p(n)=\sum_{i=1}^n i^k$ is a polynomial of degree $k+1$ in $n$.

-

Note that the question is really asking you to compare two functions of n: 'solves the equation' is slightly poor wording here, since you're being asked to show that two functions are equal and not two values. To show that they're inequal as functions of $n$, for all other values of $k$, it suffices to just find a single value of $n$ where they differ, so consider $n=2$; then $f(1)^2 = (1^1+2^1)^2 = 9$, whereas $f(k) = 1+2^k$. This should make it clear why there's only one possible value of $k$ that can lead to a match - there's only one value of $k$ that even matches at this particular $n$. The trick is then showing the match for $k=3$ and all other $n$, which you've already established.

-

I assume that you want to find values of $x$ for which $f(x) = (f(1))^2$ as functions in $n$. In this case, we can simply substitute in $n=1$, $n=2$, and $n=3$. Namely, we need to satisfy $$1^x=1 \qquad \text{and} \qquad 1^x + 2^x = 9 \qquad \text{and} \qquad 1^x + 2^x + 3^x = 36$$ Subtracting successive equations yields $$2^x = 8 \qquad \text{and} \qquad 3^x = 27$$ Obviously, $x = 3$ is the only real value which works. You might wonder whether there are any complex values. Suppose $x=a+bi$. Then $$8=2^x = 2^a2^{bi} = 2^ae^{ib\ln{2}}$$ Matching magnitudes, we need $2^a=3$, so that $a = 3$. Meanwhile, notice that $b$ must take the form $\frac{2\pi}{\ln{2}}m$ for some integer $m$. If we continue this analysis for the equation $3^x=27$, we also need that $b = \frac{2\pi}{\ln{3}}n$ for some integer $n$. Setting these expressions for $b$ equal and solving yields $$m \ln{3} = n\ln{2},$$ or equivalently, $$3^m = 2^n,$$ which is only true when $m=n=0$. Therefore, $b=0$, and so $x=3$ is the only value for which $f(x) = (f(1))^2$ for every $n$.

-