 So, for example for 9 coins we have 45 different ways of stacking them in a fountain.The number formula_1 which is the solution for the above stated problem is then given by the coefficients of the polynomial of the following generating function