We often hear about how all mathematics is interconnected, but rarely see clear and simple examples of such connections. In this post I want to show one example in which theorems developed in Calculus are used to solve a range of combinatoric problems.
To begin lets consider the following problem. For any natural number K what is the number of ways it can be written as a sum of powers of two, if we allow each of them to be used only ones? Lets suppose that the number of ways is a(k). It is obvious that a(1)=1, a(2)=1. Lets define a function: