# Showing $\lim _{n\rightarrow \infty } \dfrac {S_{n}}{n^{2}} = \dfrac{1}{6}$

I am trying to show that if the arithmetic mean of the products of all distinct pairs of positive integers whose sum is $n$ is denoted by $S_{n}$ then $$\lim _{n\rightarrow \infty } \dfrac {S_{n}}{n^{2}} = \dfrac{1}{6}$$ Solution attempt

If $n$ was even then $$S_{n} = \sum _{i=1}^{i=\dfrac{n} {2}}\dfrac {\left( n-i\right) \left( n-\left( n-i\right) \right) } {\dfrac {n } {2}} = \sum _{i=1}^{i=\dfrac{n} {2}}2i\left( 1-\dfrac {i} {n}\right)$$

so $$\lim _{n\rightarrow \infty } \dfrac {S_{n}}{n^{2}} = \lim _{n\rightarrow \infty } \sum _{i=1}^{i=\dfrac{n} {2}}\dfrac{2i}{n^{2}}\left( 1-\dfrac {i} {n}\right)$$

Similarly If $n$ was odd then $$S_{n} = \sum _{i=1}^{i=\dfrac{\left(n+1\right)} {2}}\dfrac {\left( n-i\right) \left( n-\left( n-i\right) \right) } {\dfrac {\left(n+1\right) } {2}} = \sum _{i=1}^{i=\dfrac{\left(n+1\right)} {2}}2i\left(\dfrac {n-i} {n+1}\right)$$ so $$\lim _{n\rightarrow \infty } \dfrac {S_{n}}{n^{2}} = \lim _{n\rightarrow \infty } \sum _{i=1}^{i=\dfrac{\left(n+1\right)} {2}}\dfrac{2i}{n^{2}}\left(\dfrac {n-i} {n+1}\right)$$

I am unsure how to proceed from here to show the result. Any help would be much appreciated.

-

If $n$ is odd, then $$\sum_{i=1}^{(n+1)/2} i (n-i) = \frac{(n-1)(n+1)(n+3)}{12}$$ Hence, you get that $$\frac{S_n}{n^2} = \frac{2}{n^2(n+1)} \times \frac{(n-1)(n+1)(n+3)}{12} = \frac{(1-1/n)(1+3/n)}{6}$$
If $n$ is even, then $$\sum_{i=1}^{n/2} i (n-i) = \frac{n(n+2)(2n-1)}{24}$$ Hence, you get that $$\frac{S_n}{n^2} = \frac{2}{n^2(n+1)} \times\frac{n(n+2)(2n-1)}{24} = \frac{\left(1+\frac1{n+1} \right) \left(1-\frac1{2n} \right)}{6}$$
@Hardy To evaluate $\sum_{i=1}^{k} i(n-i)$, we just need to evaluate $\sum_{i=1}^{k} i = \frac{k(k+1)}{2}$ and $\sum_{i=1}^{k} i^2 = \frac{k(k+1)(2k+1)}{6}$ since $\sum_{i=1}^{k} i(n-i) = n \sum_{i=1}^{k} i - \sum_{i=1}^{k} i^2$ –  user17762 May 4 '12 at 21:16