Spilling the beans
Problem 334
In Plato's heaven, there exist an infinite number of bowls in a straight line.
Each bowl either contains some or none of a finite number of beans.
A child plays a game, which allows only one kind of move: removing two beans from any bowl, and putting one in each of the two adjacent bowls.
The game ends when each bowl contains either one or no beans.
Each bowl either contains some or none of a finite number of beans.
A child plays a game, which allows only one kind of move: removing two beans from any bowl, and putting one in each of the two adjacent bowls.
The game ends when each bowl contains either one or no beans.
For example, consider two adjacent bowls containing 2 and 3 beans respectively, all other bowls being empty. The following eight moves will finish the game:

You are given the following sequences:
\htmltext{if }t_{i-1}\htmltext{ is even}\htmltext{if }t_{i-1}\htmltext{ is odd}
The first two terms of the last sequence are and .
If we start with and beans in two adjacent bowls, moves would be required to finish the game.
If we start with and beans in two adjacent bowls, moves would be required to finish the game.
Consider now adjacent bowls containing beans respectively, all other bowls being empty. Find how many moves it takes before the game ends.