PROJECT EULER · #0335
Gathering the Beans
Whenever Peter feels bored, he places some bowls, containing one bean each, in a circle. After this, he takes all the beans out of a certain bowl and drops them one by one in the bowls going clockwise. He repeats this, starting from the bowl he dropped the last bean in, until the initial situation appears again. For example with 5 bowls he acts as follows:

So with
Let
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.