Find count of all combination of numbers whose sum is x
Solution 1:
Place $x$ balls in a row. Then, between each pair of adjacent balls, either place a divider or don't.
Ex: With 3 balls, you can have:
O|O|O (111)
O|OO (12)
OO|O (21)
OOO (3)
Clearly, there is a 1:1 correspondence between ball/divider arrangements and combinations of numbers whose sum is $x$.
Since there are $x-1$ slots for dividers, there are $2^{x-1}$ ways to place dividers (in each slot, either place a divider or don't). Hence $f(x) = 2^{x-1}$.