I am trying to do the Euler Project Problem 31 by hand. ( https://projecteuler.net/problem=31 )
Basically, I am asked how many ways I can form 200 pence by using the denominations 200, 100, 50, 20, 10, 5, 2 and 1.
My solution (which is not correct):
It can be realized that 5 can be formed in 4 ways:
$$ 5\\ 2+2+1\\ 2+1+1+1\\ 1+1+1+1+1 $$
Since 10 = 5+5, 10 can be formed in 4*4 ways.
Since 20 = 10+10, 20 can be formed in 4*4*4*4 = $16^2$ ways
Since 50 = 20+20+10, 50 can be formed in $16^2$ * $16^2$ * 16 = $16^5$
Since 100 = 50+50, 100 can be formed in $16^5 * 16^5$ ways
Since 200 = 100 + 100, 200 can be formed in $16^5 * 16^5 * 16^5 * 16^5$ ways
Answer: 200 can be formed in $$(16^5)^4 = 16^{20} = 1 208 925 819 614 629 174 706 176$$
However this answer is not correct. What is the correct answer, how do I find it and why is my solution wrong? Thanks in advance.
When you compute the ways to make $10$ you make two mistakes. First, you miss a single $10$ coin. Second, when you choose two ways to make $5$ the order doesn't matter, as $(2+2+1)+5$ is the same as $5+(2+2+1)$. If you want to make $10$ out of two $5$'s, you can do it in $4$ (both $5$'s the same)+ ${4 \choose 2}=6$ (two different $5$'s$)=10$ ways. Finally, $100$ can be five $20$'s, which you miss because they can't make two $50$'s.