Counting nickels, dimes and quarters, order matters.

combinatoricsdiscrete mathematics

A parking meter costs 5 cents per minute and only accepts the nickels, dimes or quarters. How many different ways can $n$ minutes be purchased by inserting coins into the parking meter where the order in which the coins are inserted matters? Let $A_n$ be the number of ways $n$ minutes can be purchased and assume that the correct initial values have been defined for $A_0, A_1, A_2$, etc. have been defined as needed. Recall that 1 quarter = 25 cents, 1 dime =10 cents, and 1 nickel = 5 cents.

Answer choices

  1. $A_n = A_{n-5} + A_{n-2} + A_{n-1}$
  2. $A_n = A_{n-25} + A_{n-10} + A_{n-5}$
  3. $A_n = A_{n-5} \cdot A_{n-2} \cdot A_{n-1}$
  4. $A_n = 5\cdot A_{n-5} +2\cdot A_{n-2} + A_{n-1}$

Part of my work or
Explanation and Justification:

The simpler rows are justified by writing out the sequences.
I explain more complex rows with the following formula.
w-xNyDzQ
xN represents number of Nickels
yD represents number of Dimes
zQ represents number of Quarters
w is the number of permutations of that set of nickels, dimes and quarters.
Note: "order matters" so 15 cents from ND is different from DN

Ex. From row $A_4$, 3-2N1D represents two nickels and one dime. NND, NDN, DNN is 3 permutations.

$A_n$ Value Count Justification
$A_0$ 0 0 {null set is empty**}
$A_1$ 5 1 {N}
$A_2$ 10 2 {NN}, {D}
$A_3$ 15 3 {N}, {ND, DN}
$A_4$ 20 5 NNNN, 3-2N1D, DD
$A_5$ 25 9 1-5N, 4-3ND, 3-1N2D, 1Q
$A_6$ 30 14 1-6N, 5-4N,1D, 6-2N2D, 2-QN

** In my humble opinion, I.M.H.O., $A_0$ should be excluded from the question to make the recursive rule work.

However, my $A_4$, $A_5$, $A_6$ don't fit any of the options given for recursive formulas.
$A_{n-25}$ would be related 125 cents prior, not 25 cents prior, so option 2 is pretty clearly incorrect. Option 3 and option 4 seem to be growing far quicker than my table.
Option 1 is the closest fit, but breaks down on $A_6$.

Best Answer

Thanks to @GerryMyerson I figured it out. I was missing the 3 dimes permutation in the $A_6$ row. That row should list a count of 15 which is consistent with the recursive formula for multiple choice 1.