← Complete problem index

PROJECT EULER · #0566

Cake Icing Puzzle

Statement only · UnsolvedOriginal problem ↗

Adam plays the following game with his birthday cake.

He cuts a piece forming a circular sector of 60 degrees and flips the piece upside down, with the icing on the bottom.
He then rotates the cake by 60 degrees counterclockwise, cuts an adjacent 60 degree piece and flips it upside down.
He keeps repeating this, until after a total of twelve steps, all the icing is back on top.

Amazingly, this works for any piece size, even if the cutting angle is an irrational number: all the icing will be back on top after a finite number of steps.

Now, Adam tries something different: he alternates cutting pieces of size x=3609 degrees, y=36010 degrees and z=36011 degrees. The first piece he cuts has size x and he flips it. The second has size y and he flips it. The third has size z and he flips it. He repeats this with pieces of size x, y and z in that order until all the icing is back on top, and discovers he needs 60 flips altogether.

0566-cakeicingpuzzle.gif

Let F(a,b,c) be the minimum number of piece flips needed to get all the icing back on top for pieces of size x=360a degrees, y=360b degrees and z=360c degrees.
Let G(n)=9a<b<cnF(a,b,c), for integers a, b and c.

You are given that F(9,10,11)=60, F(10,14,16)=506, F(15,16,17)=785232.
You are also given G(11)=60, G(14)=58020 and G(17)=1269260.

Find G(53).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.