A vord is a sequence of letters, where each letter can be “A,” “B,” or “C.” The value of a vord with A’s, B’s and C’s is ; for example, AAAA is a vord with value 4 while ACAAB is a vord of value 10. How many vords have value 14 and do not end with “BC?”
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let V ( n ) be the number of vords with a total value of n .
The number of distinct permutations of p "A"s, q "B"s and r "C"s is p ! q ! r ! ( p + q + r ) ! .
So we have
V ( n ) = p + 3 q + 4 r = n ∑ p ! q ! r ! ( p + q + r ) !
(where p , q , r are all non-negative integers). For computation, we can simplify this slightly by making sure 3 q + 4 r ≤ n and replacing p with n − 3 q − 4 r .
V ( n ) = 3 q + 4 r ≤ n ∑ ( n − 3 q − 4 r ) ! q ! r ! ( n − 2 q − 3 r ) !
Finally, the number of vords with value 1 4 that end in the letters "BC" is just V ( 7 ) . So for the answer we compute V ( 1 4 ) − V ( 7 ) = 4 4 1 − 1 5 = 4 2 6 .