exact closed form expression

91 Views Asked by At

The question is to find the exact closed form of the expression

$(0^2+...+n^2)+(1^2+...+(n+1)^2)+...+(n^2+...+(2n)^2)$

Hint (find the exact closed form of $(n)(1^2)+(n-1)(2^2)+...+(1)(n^2)$ first).

The exact closed form of the hint $=(n)(1^2)+(n-1)(2^2)+...+(1)(n^2)$ $=(n)(1+(2^2)+(3^2)+...+n^2)-(2^2+(2)(3^2)+...+(n-1)(n^2))$ $=n((1/3)(n^3)+(1/2)(n^2)+(1/6)(n))-...$(I do not know how to evaluate this term)

I also do not know about the relationship between the answer of the hint and the question

Could someone please help me?

Thank you very much.

1

There are 1 best solutions below

2
On BEST ANSWER

$$\sum_{i=0}^n\sum_{j=0}^n(i+j)^2=\left((0+0)^2+\cdots+(n+0)^2\right)+\left((0+1)^2+\cdots+(n+1)^2\right)+\cdots+\left((0+n)^2+\cdots+(n+n)^2\right)$$

This is basically the equivalent of the for loop:

x=0;

for i in (0,n):
   for j in (0,n):
      x=x+(i+j)^2

According to Wolfram Alpha, this reduces to $\frac{1}{6} n (1 + n)^2 (2 + 7 n)$


Edit:

The hint can be evaluated as follows. Examine the original sum, $$(n)(1^2)+(n-1)(2^2)+\cdots+(1)(n^2)$$ Notice that the last term, $(1)(n^2)$, is equivalent to $(n-(n-1))(n^2)$, and each term on the left is 1 less than the previous - so we can rewrite the summation: $$(n)(1^2)+(n-1)(2^2)+\cdots+(n-(n-1))(n^2)=\sum_{i=1}^{n}i^2(n-i+1)$$ Distribute the terms in the summation $$\sum_{i=1}^{n}i^2(n-i+1)=\sum_{i=1}^{n}\left(ni^2-i^3+i^2\right)=n\sum_{i=1}^{n}i^2-\sum_{i=1}^{n}i^3+\sum_{i=1}^{n}i^2$$ Combine like terms and rewrite $$n\sum_{i=1}^{n}i^2-\sum_{i=1}^{n}i^3+\sum_{i=1}^{n}i^2=(n+1)\sum_{i=1}^{n}i^2-\sum_{i=1}^{n}i^3$$ The new expression can be evaluated using your choice of Harmonic numbers, Bernoulli numbers, the Riemann zeta function, etc.; you should get: $$\left(n+1\right)\left(\frac{1}{6}n(n+1)(2n+1)\right)-\frac{1}{4}n^2(n+1)^2=\frac{1}{12}n(n+1)^2(n+2)$$ I'm not sure how exactly this relates to the question, except that they both involve summations of squares. I suppose you could relate them by considering that each partial sum of the original expression is given by a similar summation $$(0^2+\cdots+n^2)=\sum_{i=0}^n i^2\\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1^2+\cdots+(n+1)^2)=\sum_{i=1}^{n+1} i^2\\\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (n^2+\cdots+(n+n)^2)=\sum_{i=n}^{n+n} i^2$$ The total of these is the double summation from my original response: $$\sum_{i=0}^n\sum_{j=i}^{n+i}j^2=\sum_{i=0}^n\sum_{j=0}^n(i+j)^2$$ I guess you could use generalized harmonic numbers to solve both?... Sorry, but that's all I've got.