# Sum of perfect squares to infinity

In this article, the method of computing $1+2+\dots$ is outlined. Is there a similar method for computing $1^2+2^2+\dots$? What about for the general power $n$? (That is, $1^n+2^n+\dots$)

To go to infinity you will need the Riemann zeta function.

For powers $n$ the result is given by $\zeta(-n)=-\frac{B_{n+1}}{n+1}$.
(this means $0$ for $n$ even since $B_n$ is a Bernoulli number)

The story is that $\displaystyle f(s)=\sum_{k=1}^\infty \frac 1{k^s}$ was found convergent for $s>1$ (Euler solved the famous 'Basel' case $s=2$) so that a function was searched later that worked for any complex $s\not= 1$ (Riemann).

For negative integer values of $s$ you'll get your limits.
In the wikipedia section kindly linked by Will Jagy note the Bernoulli numbers : that's what you really need! (Euler's teacher was Jean Bernoulli by the way...).

For the story of Euler's contribution see Sandifer's 'How Euler did it'.

Ramanujan rediscovered your series too but that's another story.

There is no similar method to compute $1^2+2^2+\cdots$. However, there is a trick for you to compute any finite term series sum like $\sum\limits_{k=0}^{m}k^n$.

To find such a sum, you first need to know the sums $\sum\limits_{k=0}^{m}{k^p}, \forall p<n$. Then you can use the following trick to find $\sum\limits_{k=0}^{m}k^n$.

1. Rewrite $$\sum\limits_{k=0}^{m}k^{n+1}=\sum\limits_{k=0}^{m+1}k^{n+1}-(m+1)^{n+1}$$
2. Rewrite the first term $$\sum\limits_{k=0}^{m+1}k^{n+1}=\sum\limits_{k=0}^{0}0^{n+1}+\sum\limits_{k=1}^{m+1}k^{n+1}=\sum\limits_{k=0}^{m}(1+k)^{n+1}$$
3. Expand $(1+k)^{n+1}$ using binomial coefficients, i.e. $$(1+k)^{n+1}=\sum\limits_{p=0}^{{n+1}}{{n+1}\choose p}k^p1^{{n+1}-p}=\sum\limits_{p=0}^{n+1}{{n+1}\choose p}k^p=k^{n+1}+\sum\limits_{p=0}^{n}{{n+1}\choose p}k^p$$
4. Put these pieces together, then you have $$\sum\limits_{k=0}^{m}k^{n+1}=\sum\limits_{k=0}^{m+1}k^{n+1}-(m+1)^{n+1}=\sum\limits_{k=0}^{m}\left(k^{n+1}+\sum\limits_{q=0}^{n}{{n+1}\choose p}k^p\right)-(m+1)^{n+1}\\=\sum\limits_{k=0}^{m}k^{n+1}+\sum\limits_{q=0}^{n}{{n+1}\choose p}\left(\sum\limits_{k=0}^{m}k^p\right)-(m+1)^{n+1}$$ implying that$$\sum\limits_{p=0}^{n}{{n+1}\choose p}\left(\sum\limits_{k=0}^{m}k^p\right)-(m+1)^{n+1}=0$$ Therefore, we have $${{n+1}\choose n}\sum\limits_{k=0}^{m}k^n=(m+1)^{n+1}-\sum\limits_{p=0}^{n-1}{{n+1}\choose p}\left(\sum\limits_{k=0}^{m}k^p\right)$$ namely $$\sum\limits_{k=0}^{m}k^n=\frac{1}{n+1}\left((m+1)^{n+1}-{{n+1}\choose n-1}\sum\limits_{k=0}^{m}k^{n-1}-\cdots-{{n+1}\choose 1}\sum\limits_{k=0}^{m}k-{{n+1}\choose 0}\sum\limits_{k=0}^{m}1\right)$$ Since you know for $n=1$$\sum\limits_{k=0}^{m}k=\frac{m(m+1)}{2}$$, then use the above trick you can derive$\displaystyle \sum\limits_{k=0}^{m}k^2$,$\displaystyle \sum\limits_{k=0}^{m}k^3\cdots$,$\displaystyle \sum\limits_{k=0}^{m}k^{n-1}$, and finally$\displaystyle \sum\limits_{k=0}^{m}k^n\$.
• This is, sadly, not what the OP is asking. – Pedro Tamaroff Jul 27 '12 at 3:12