Loonies and Toonies Combinatorics

401 Views Asked by At

How many ways can you make $n$ Canadian dollars using only loonies (Canadian \$1 coins) and toonies (Canadian \$2 coins) such that the numbers of loonies and toonies are different from one another?

I am trying to find the series needed to solve it.

1

There are 1 best solutions below

3
On

Denote the number of Loonies $l$, Toonies $t$. We want the number of integer solutions to $2l + t = n$.

Consider the coefficient of $x^n $ in the series expansion of $(1+x^2 + x^4+ \cdots)(1+x+x^2 + \cdots)$.

Then we get the partial fraction decomposition of $\displaystyle \frac1{(1-x^2)(1-x)} = \frac1{(1-x)^2 (1+x)} = \frac1{4(1-x)} + \frac1{2(1-x)^2} + \frac1{4(1+x)}$

Put this in the form of an infinite geometric series. We get:

$$ \frac1{4} \sum_{n=0}^\infty x^n + \frac1{2} \sum_{n=0}^\infty (n+1)x^n + \frac1{4} \sum_{n=0}^\infty (-x)^n = \sum_{n=0}^\infty x^n \left(\frac{2n + 3 + (-1)^n}{4}\right) $$

EDIT: To account for $l \neq t$ we can subtract the case where $l=t$. This only happens if $n$ is a multiple of 3 (i.e. $3l = n$). But in each of those cases it can be shown there is only one way to do that. So it is $\displaystyle \frac{2n+3+(-1)^n}{4} -1$ in the event that $n$ is a multiple of 3, but if not the aforementioned formula still holds.