ROSECODE 487
Good sequences revisited
Let be the number of good sequences which meet the following condition:
(1) The sequence has elements
(2) The maximum element in the sequence is equal to
(3) The sequence contains records
(4) Each number occurs no more than times in the sequence
The good sequence and records are the same definition in Problem 474.
For example, is 3. Only three sequences , , meet the conditions:
(1) 4 elements
(2) Maximum element = 2
(3) 2 records
(4) Each number occurs no more than 2 times
Notice is not in because number 1 occurs 3 times; is not in because it contains only 1 record and number 2 occurs 3 times; is not in because the maximum element is 3.
You are given and .
Find .
Thanks to C_K_Yang for the idea.
(1) The sequence has
(2) The maximum element in the sequence is equal to
(3) The sequence contains
(4) Each number occurs no more than
The good sequence and records are the same definition in Problem 474.
For example,
(1) 4 elements
(2) Maximum element = 2
(3) 2 records
(4) Each number occurs no more than 2 times
Notice
You are given
Find
Thanks to C_K_Yang for the idea.