Problem

Source: 2012 Sharygin Geometry Olympiad Final Round 10.1

Tags: geometry, 3D geometry, grid, square grid, cube, rectangle



Determine all integer $n$ such that a surface of an $n \times n \times n$ grid cube can be pasted in one layer by paper $1 \times 2$ rectangles so that each rectangle has exactly five neighbors (by a line segment). (A.Shapovalov)