PROJECT EULER · #0334
Spilling the Beans
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.
For example, consider two adjacent bowls containing

You are given the following sequences:
The first two terms of the last sequence are
If we start with
Consider now
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.