Coins in a fountain is a problem in combinatorial mathematics that involves a generating function.
Above the bottom row, consecutive coins are not required to touch.
[1] The above sequence show the number of ways in which n coins can be stacked.
which is the solution for the above stated problem is then given by the coefficients of the polynomial of the following generating function: Such generating function are extensively studied in[4] Specifically, the number of such fountains that can be created using n coins is given by the coefficients of: This is easily seen by substituting the value of y to be 1.
This is because, suppose the generating function for (1) is of the form: then, if we want to get the total number of fountains we need to do summation over k. So, the number of fountains with n total coins can be given by: which can be obtained by substituting the value of y to be 1 and observing the coefficient of xn.
Also, consider a normal fountain with a supposed gap in the second last layer (w.r.t.