0

I have the following question:

Prove $$ n2^{n-1} + n(n-1)2^{n-2} = \sum_{k=0}^{n} {n\choose k} k^2 $$

The best I could do was get to

$$ \sum_{k=0}^{n} {n\choose k} \frac{1}{n-k-1} + \sum_{k=0}^{n} {n\choose k} \frac{1}{(n-k-1)(n-k-2)}$$

Guysudai1
  • 493

2 Answers2

4

Define

$$f(x)=(1+x)^n=\sum\limits_{k=0}^n{n\choose k}x^k$$

Then

$$f'(x)=n(1+x)^{n-1}=\sum\limits_{k=0}^nk{n\choose k}x^{k-1}$$

What do you get if you differentiate $xf'(x)$?


Foobaz' answer reminds me of another method.

$$k{n \choose k}=\frac{k\,n!}{k!(n-k)!}=\frac{n(n-1)!}{(k-1)!(n-k)!}=n{n-1\choose k-1}$$

Likewise:

$$k(k-1){n \choose k}=\frac{k(k-1)n!}{k!(n-k)!}=\frac{n(n-1)(n-2)!}{(k-2)!(n-k)!}=n(n-1){n-2\choose k-2}$$

Therefore

$$\sum_{k=0}^nk^2{n\choose k}=\sum_{k=2}^nk(k-1){n\choose k}+\sum_{k=1}^nk{n\choose k}\\ =\sum_{k=2}^nn(n-1){n-2\choose k-2}+\sum_{k=1}^nn{n-1\choose k-1}=n(n-1)2^{n-2}+n2^{n-1}$$

  • That's cool, how do you even see what function you should make, or how to get to what you get. Thanks for the help! – Guysudai1 Jun 13 '18 at 06:42
  • Why does the derivative equal to that sum, i thought it would be. $$ {n\choose k} x^{n-k-1} $$ – Guysudai1 Jun 13 '18 at 06:50
  • @Guysudai1 When you differentiate $x^k$, you get $kx^{k-1}$. Differentiate again, and you get $k(k-1)x^{k-2}$ The binomial coefficient does not change, there is just an additional $k(k-1)$ factor. To get $k^2$ instead of $k(k-1)$, you must manage to differentiate $x^k$ again. To achieve this, multiply $x^{k-1}$ by $x$. That is, multiply the whole expression $f'(x)$ by $x$, before differentiating again. – Jean-Claude Arbaut Jun 13 '18 at 07:21
  • @Guysudai1 When you expand $(1+x)^n$ you can write $$(1+x)^n=\sum\limits_{k=0}^n{n\choose k}1^kx^{n-k}=\sum\limits_{k=0}^n{n\choose k}1^{n-k}x^k$$ That's because $(1+x)^n=(x+1)^n$, or because ${n\choose k}={n\choose n-k}$. – Jean-Claude Arbaut Jun 13 '18 at 07:25
0

Note that $$ \sum_{k=0}^{n} {n\choose k} k^2=2\sum_{k=0}^n\binom{n}{k}\binom{k}{2}+ \sum_{k=0}^nk\binom{n}{k}\tag{0} $$ We claim that $$ \sum_{k=0}^nk\binom{n}{k}=n2^{n-1}.\tag{1} $$ Indeed both sides count tuples $(x,A)$ where $x\in A$ and $A\subset[n]$. The RHS chooses $x$ first ($n$ choices) and then we have $2^{n-1}$choices for the remaining elements of $A$ as $A\setminus x\subset [n]\setminus x$. The RHS classifies classifies $A$ based on its cardinality. If $|A|=k$, then there are $\binom{n}{k}$ choices for $A$ and then we can choose $x$ in $k$ ways. Sum over $k$ to get the result.

Next we claim that $$ \sum_{k=0}^n\binom{n}{k}\binom{k}{2}=\binom{n}{2}2^{n-2}.\tag{2} $$ Indeed both sides count tuples $(A, B)$ where $A\subset B\subset[n]$ and $|A|=2$ and can be reasoned similarly as in the previous paragraph.

It follows from $(0), (1)$ and $(2)$ that $$ \sum_{k=0}^{n} {n\choose k} k^2=n2^{n-1}+2\binom{n}{2}2^{n-2}= n2^{n-1}+n(n-1)2^{n-2} $$ as desired.