Number of ways to get a sum 11 using numbers 1,3 and 5? How can we find the number of ways to get sum $11$ using numbers $\{1,3,5\}$?  Repetition of numbers is allowed. For example, one way is to take number $1$ and sum it $11$ times. Another is $5+5+1$. Ordering of numbers does not matter.

One method is to use generating functions:
\begin{align}
 & (1+x+x^2+x^3+\cdots)(1+x^3+x^6+x^9+\cdots)(1+x^5+x^{10}+x^{15}+\cdots) \\
 & = \frac{1}{1-x} \cdot \frac{1}{1-x^3} \cdot \frac{1}{1-x^5} \\
 & = 1 + x + x^2 + 2x^3 + 2x^4 + 3x^5 + 4x^6 + 4x^7 + 5x^8 + 6x^9 + 7x^{10} \\
 & \quad + 8x^{11} + 9x^{12} + 10x^{13} + 11x^{14} + 13x^{15} + 14x^{16} + \cdots
\end{align}
We want the coefficient of the $x^{11}$ term, which is $\fbox{8}$. Moreover, since the denominator of the generating function is $(1-x)(1-x^3)(1-x^5) = 1-x-x^3+x^4-x^5+x^6+x^8-x^9$, a recursive formula for the coefficients is $a_n = a_{n-1} + a_{n-3} - a_{n-4} + a_{n-5} - a_{n-6} - a_{n-8} + a_{n-9}$.
