In post 93, chennisden wrote:here's a nice problem:
A secret spy organization needs to spread some secret knowledge to all of its members. In the beginning, only 1 member is informed. Every informed spy will call an uninformed spy such that every informed spy is calling a different uninformed spy. After being called, an uninformed spy becomes informed. The call takes 1 minute, but since the spies are running low on time, they call the next spy directly afterward. However, to avoid being caught, after the third call an informed spy makes, the spy stops calling. How many minutes will it take for every spy to be informed, provided that the organization has 600 spies?
S0 = 1
S1 = 2
S2 = 4
S3 = 8
and
Si = 2*Si-1 - Si-4 for i > 3
So you get a goofy fibonacci-esque recursive sequence. For something as low as 600, you can just do it manually or programatically to get the sequence:
1, 2, 4, 8, 15, 28, 52, 96, 177, 326, 600, 1104, 2031, 3736, 6872, 12640, 23249, 42762, 78652, 144664, 266079, 489396, 900140, 1655616
And you see that you've informed exactly 600 spies in 10 minutes. To solve it for an arbitrary N, there should be a closed form solution of the form sum(c_i a_i ^ N) with at most four terms, which wouldn't be terribly difficult to sort out.