Writeup: IMO Shortlist 2001 C5
Problem Statement:
Find all finite sequences such that for every , , equals the number of times appears in the sequence.
My Solution:
After attempting A2 today and failing miserably, this problem made me feel better about myself. I felt like this was more of a logic puzzle than anything else.
The first thing I noticed was that , otherwise we would have a contradiction, and that . I also noticed that giving positive values for where is a large number "spawns" in a lot of numbers, which could break the summation constraint I just mentioned above.
The key observation to solving this problem is that
where is the number of nonnegative terms in the sequence.
Now note that we must have be positive, and there are positive terms from to So all the other terms must be , , or . Note that we can only have be a value greater than . So the values we have to inspect are , and . Note that, if , then the only sequence that satisfies will be . If , then the only sequence that satisfies these constraints will be , . If , then we have the sequence , since we must have (if it was 2, then we would have another non-1 and non-2 value with value somewhere else), and we can't have otherwise we would have 's, so we must have , and therefore we must have . These are the only solutions so we're done.