David W. answered 10/01/17
Experienced Prof
This is because both the decimal (that is, base 10) and the quinary (that is, base 5 – even though these digits are 1-6 instead of 0-5) are positional number systems.
The digits in the ones place go from 1 to 6. These are always less than the digits in the fives (not tens) place that go from 1 to 6, which are always less than the digits in the twenty-fives place, etc.
Since repetition is not allowed, you count by putting each of the remaining digits in the ones place (1 choice), then put each of the remaining digits in the fives place (2 choices), then put each of the remaining digits in the twenty-fives place (1*2*3=6 choices) … until you reach or exceed 291.
It is extremely helpful to know how many digits are needed before 291 is exceeded. The formula for permutations without replacement, P(n,r) = n!/(n-r)!, is essential. When n=6, how large does r have to be to get a value for P that is roughly 291?
Important: for n=6, r=4, P(6,4) = 6*5*4*3*2*1 / 2*1 = 6*5*4*3 = 360
If we start with 1xxxxx, we can count 120 terms from 123456 to 165432.
There are 120 more terms from 213456 to 265431. 240 so far, so we continue with 312xxx.
Now, groups of P(6,2)= 30 [1 group gets us to 270]. We continue with 324xxx.
Then, groups of P(6,1) = 6 [this will take (291-270)/6 = 3 remainder 3]. Three groups are:
324156 to 324651 [271-276]
So we have 341526.
We can count:
1 123456 123345x has 1 choice
2 123465 and 12346 has 1 choice, but 1234xx has a total of 2 choices
3 123546
4 123564 and 1235xx also has 2 choices
5 123645
6 123654 but 123xxx has a total of 6 choices
7 124356
8 124365
9 124536
10 124563
11 124635
12 124653 but 124xxx has 6 more choices
13 125364
. . .
. . .
. . .
97 162345
. . .
288 326541 the last of the 32xxxx terms (no 33xxxx terms because no repetition)
289 341256
290 341265
291 341526 *** This is term 291.
. . .