Problem

Source: Pan African 2001

Tags: geometry, 3D geometry, geometric transformation, reflection, floor function



Let $n$ be a positive integer. A child builds a wall along a line with $n$ identical cubes. He lays the first cube on the line and at each subsequent step, he lays the next cube either on the ground or on the top of another cube, so that it has a common face with the previous one. How many such distinct walls exist?