Confused about the meaning behind making x = 2 in the binomial theorem So the binomial theorem states $(1+x)^n = \sum^{n}_{k=0}$$n \choose k$$x ^ k$.
Now I understand that each term of the sum represents the number of ways to arrange 1 and $x$ out of $n$ choices, so there ends up being $k$ number of $x$'s.
I understand what happens when instead of a $1$ and $x$ there's an $a$ and $b$, if there's $k$ $a$'s, there's $n-k$ $b$'s.
I also understand what it means when $x = 1$, so the right hand side ends up being the summation of all the $n \choose k$, which means the left side equals the number of all subsets you can get from a set, $2^n$, which is already known/proved by this theorem.
Now what I don't get, is when $x$ is anything other than 1. What does it mean when $x = 2$ for example? What meaning does the left side $= 3^n$ have? What meaning does $\sum^{n}_{k=0}$$n \choose k$$2 ^ k$. have? I get to some extent it will just be what the polynomial equals when you plug in $x = 2$, but does it have any special meaning that has to do with subsets and size of sets, etc.?
Thanks!
 A: Notice that $$\sum _{k=0}^n\binom{n}{k}2^k=\sum _{k=0}^n\binom{n}{n-k}2^{n-k}=\sum _{k=0}^n\binom{n}{k}2^{n-k}=\sum _{k=0}^n\binom{n}{k}\left (\sum _{l=0}^{n-k}\binom{n-k}{l}\right )=\sum _{k=0}^n\sum _{l=0}^{n-k}\binom{n}{k}\binom{n-k}{l}.$$
Check the right hand side of this line, this means choosing the positions for a first object(if, apriori, you know that you want $k$ of those) and then choosing the positions of a second object (if you know you want $l$ of them). Notice that there is a third object, that you will place in the rest $n-(k+l)$ positions.
This is why this is $3^n$ which encodes the ways to put $3$ kind of objects in $n$  slots.
What you say about $(a+b)^n$ is a little wrong in the sense that $a$ is like a box of objects with $a$ different types and $b$ is another box in which you have $b$ different types of objects. In the particular case of $3^n$ you have in the first box the type $1$ and in the second box the type $2$ and $3.$
A: $(1 + 2)^n = (1 + 2)(1+2)\ldots(1+2).$ Each term of this expansion will be a product of one term from each monomial, so either a $1$ or a $2$. Now the expression $\sum^{n}_{k=0} \binom{n}{k}2^k$ is referring to the fact that for each of the $n$ monomials you can select between $0$ and $n$ of them to be the $2$. Suppose $k$ is fixed. This means you are considering a term from the expansion in which you have selected $k$ of the terms from the monomials to be $2$. Certainly the product of $k$ $2's$ and $n-k$ $1$'s will be $2^k$.  Then since there are $\binom{n}{k}$  ways to select $k$ twos we see that this summand in the binomial theorem refers to the number of ways to select $k$ $2's$ and achieve a given product. This is then summed over all possible values of $k$ indicating the inclusion of all members of the expanded product.
