If we don't use any half dollars, then since 3.85/.25 = 15.4, the
maximum number of quarters is 15.
If we use a total of q quarters then we have to make $3.85-$.25q with
only 22-q coins. The most amount of money 22-q coins can be is the
amount when they are all dimes, so
.10(22-q) >= 385-.25q
Solving this gives
q >= 11
So the number of quarters is between 11 and 15
But if we use 15 quarters, that's $3.75 and we would have to make
the remaining $.10 with 7 coins which is not possible.
If we use 14 quarters, that's $3.50 and we would have to make
the remaining $.35 with 8 coins smaller than a quarter, which
can only be done with 3 dimes and 5 pennies. That's 1 way.
If we use 13 quarters, that's $3.25 and we would have to make
the remaining $.60 with 9 coins smaller than a quarter, which
can only be done with 3 dimes and 6 nickels. That's 1 way.
If we use 12 quarters, that's $3.00 and we would have to make
the remaining $.85 with 10 coins smaller than a quarter, which
can only be done with 7 dimes and 3 nickels. That's 1 way.
If we use 11 quarters, that's $2.75 and we would have to make
the remaining $1.10 with 11 coins smaller than a quarter, which
can only be done with 11 dimes. That's 1 way.
That's 4 ways using no half dollars.
It's a similar problem if we allow 1,2,3,4,5,6 or 7 half dollars.
If we use 1 half dollar then we have to make $3.35 with 21 coins.
Proceding as above we get 4 ways for this too.
If we use 2 half dollar then we have to make $2.85 with 20 coins.
Proceding as above we get 6 ways for this.
If we use 3 half dollar then we have to make $2.35 with 19 coins.
Proceding as above we get 9 ways for this.
If we use 4 half dollar then we have to make $1.85 with 18 coins.
Proceding as above we get 6 ways for this.
If we use 5 half dollar then we have to make $1.35 with 17 coins.
Proceding as above we get 7 ways for this.
If we use 6 half dollar then we have to make $.85 with 16 coins.
Proceding as above we get 5 ways for this.
If we use 7 half dollar then we have to make $.35 with 15 coins.
Proceding as above there is only 1 ways for this, 5 nickels and 10
pennies.
Total: 4+4+6+9+6+7+5+1 = 42
Edwin