Lol it's difficult to explain - it makes sense to me
.
Basically I'm fixing the number of 2 dollar and 1 dollar coins and then working out how many possibilities of 20 and 50 cent coins there are. Do you understand why my original equation is as it is?
So lets say you have 2 two dollar coins and 2 one dollar coins.
By my equation, you have:
40 (twenty times the number of two dollar coins) + 20 (for the one dollar coins) + 5 times the number of 50 cent coins + 2 times the number of 20 cent coins = 10
So you have 40 + 20 + 5x
2 + 2x
1 = 100
5x
2 + 2x
1 = 40
x2 and x1 have to be integers, and as 2x
1 is even, then 5x
2 must be even (because they add to give an even number). So the possible ways are to have 0 + 40, 10 + 30, 20 + 20 and 30 + 10, 40 + 0. So for 2 two dollar and 2 one dollar coins, you have five different ways. Similarly, if you had 2 two dollar coins and only 1 one dollar coin, you would be looking for ways to have 5x
2 + 2x
1 = 50, and by the above argument there are 6 such ways. In general, there are n + 1 different solutions to 5x
2 + 2x
1 = 10n.
If you have no twenty cent coins, then you can have anywhere from 0 to 10 ten cent coins, so n can range from 0 to 10 and n + 1 varies from 1 to 11. So you have 11 + 10 + 9 +...+ 1 solutions for no twenty cent coins.
If you have one twenty cent coin, the rest can only add up to 80, so n can only be between 0 and 8, so you have 9 + 8 + 7 +...+ 1 solutions for one twenty cent coin... and so on down to 5 twenty cent coins (for which there's only one solution).
Lol it seemed so much simpler in my head
. I don't actually know whether that will make more sense to you. It's difficult for 2U though - there should be a simpler way?