When wrapping several cubes in paper, it is more efficient to wrap them all together than to wrap each one individually. For example, with 10 cubes of unit edge length, it would take 30 units of paper to wrap them in the arrangement shown below, but 60 units to wrap them separately.
Define to be the maximum amount of paper that can be saved by wrapping identical cubes in a compact arrangement, compared with wrapping them individually. We insist that the wrapping paper is in contact with the cubes at all points, without leaving a void.
With cubes, the arrangement illustrated above is optimal, so . With cubes, it can be shown that the optimal arrangement is as a , using units of paper, whereas wrapping individually would use units of paper; hence .
Define
You are given that , and .
Find . Give your answer modulo .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.