7

It is well known that $S_1\equiv \sum_{k=0}^n k = \binom{n+1}{2}$. How is this formula generalized for sums of products of pairs of integers smallest than $n$? In the simplest case, this is $$S_2 \equiv \sum_{0\le i<j\le n}ij = \frac12 \left(\sum_{i,j=0}^n ij - \sum_{i=0}^n i^2\right).$$ I can rewrite this as $$S_2 = \sum_{i=1}^n i \sum_{j=i+1}^n j = \sum_{i=1}^n i \left[\binom{n+1}{2}-\binom{i+1}{2}\right].$$ Is there a more explicit formula for this? Or maybe a more direct or geometrical argument to get to this?

More generally, are there formulae for $S_k\equiv \sum_{0\le i_1<...<i_\ell\le n}i_1\cdots i_\ell$?

One context in which these numbers arise is in the coefficients of $s!/(s-k)!$ with $k\le s$: $$\frac{s!}{(s-k)!} = \sum_{j=0}^k S_k s^k.$$

glS
  • 7,963

1 Answers1

6

If you go one step further in your first line, then you can write this as

$$ S_2 = \frac{1}{2}(\sum_{i=0}^n i)^2 - \frac{1}{2}\sum_{i=0}^n i^2.$$

The first sum is $n(n+1)/2$. The second is $n(n+1)(2n+1)/6$. Altogether then, this gives

$$ S_2 = \frac{n^2(n+1)^2}{8} - \frac{n(n+1)(2n+1)}{12},$$

which can be simplified to suit. (In particular, for example, $S_2=n^4/8 + O(n^3)$).

Thomas Bloom
  • 2,831
  • good point, should have seen that. What about for $S_k$? – glS Oct 06 '20 at 12:42
  • Similar formula can be derived for any $S_k$, by the same trick. As player3236 says, to see what the general case looks like, look up Stirling numbers of the first kind. – Thomas Bloom Oct 06 '20 at 12:45
  • 1
    could you add at least how this trick works for $S_3$? It's not so obvious, as $\left(\sum_i i\right)^3-\sum_i i^3$ is not enough anymore – glS Oct 09 '20 at 13:58