Browse · MathNet
PrintBulgarian Winter Tournament
Bulgaria counting and probability
Problem
Given a natural number . We have balls numbered , , , , ..., (only the first two are the same). We need to color these balls in given colors so that every ball is a single color and every color is used at least once. We denote by the number of possible colorings. Find the smallest for which is divisible by . (Ivaylo Kortezov)
Solution
Exactly one of the colors will be used for two of the balls; let their numbers be and , such that .
If , then we have choices for and , and choices for their color. The remaining balls (two of which are the same) must be colored in the remaining colors; for this we have variants. Therefore, in this case the number of possible colorings is .
If , then there are options for coloring all balls except in colors. Now there are choices for the color of . Thus, in this case there are possible colorings.
Finally .
If is a multiple of and , it must be . Direct inspection shows that the smallest such is , but is not divisible by , and the next suitable is , where is divisible by .
If , then we have choices for and , and choices for their color. The remaining balls (two of which are the same) must be colored in the remaining colors; for this we have variants. Therefore, in this case the number of possible colorings is .
If , then there are options for coloring all balls except in colors. Now there are choices for the color of . Thus, in this case there are possible colorings.
Finally .
If is a multiple of and , it must be . Direct inspection shows that the smallest such is , but is not divisible by , and the next suitable is , where is divisible by .
Final answer
13
Techniques
Pigeonhole principleEnumeration with symmetryPrime numbers