My friend gave a fun problem to me that went as follows:
A. For how many of these questions is zero the answer?
B. For how many of these questions is one the answer?
C. For how many of these questions is two the answer?
D. For how many of these questions is three the answer?
E. For how many of these questions is four the answer?
F. For how many of these questions is five the answer?
G. For how many of these questions is six the answer?
H. For how many of these questions is seven the answer?
I. For how many of these questions is eight the answer?
Now, without much work one can show that this has a unique solution $(5,2,1,0,1,0,0,0,0)$. My friend and I got curious about thinking of this as a more general question when $n=8$, so we started off with smaller numbers to see if there might be a pattern. As such, it's easy to see that $n=1$ and $n=2$ have no solutions, and I found a solution for $n=3$ and $n=4$.
I wasn't sure about $n\geq5$, but I was wondering if anyone else had thought about such a problem and if the solutions were always unique?
Certainly one of the things any of these problems must satisfy is that the last question must have the answer zero (ergo, the solution for $0$ is at least one).
If anyone is able to shed light on this problem, I'm pretty curious about it.
This is problem C5 of the IMO Shortlist 2001. See
http://mks.mff.cuni.cz/kalva/short/soln/sh01c5.html
http://www.artofproblemsolving.com/Forum/viewtopic.php?t=17457
http://olympiads.win.tue.nl/imo/imo2001/imo2001-shortlist.pdf