Let's start with some definitions and general observations. In the following, we denote by (i,j) the 1×1 small square located at the j-th level of the i-th step. We will call the upper square each small square (k,k), i.e., each square located at the very top of a step.
We consider the construction of a staircase of size n using f(n) square stones. Two distinct upper squares cannot belong to the same stone. Since there are exactly n upper squares in a staircase of size n, we deduce that f(n)⩾n for all n⩾0. We now address questions 1 and 2.
1. First, it is clear that f(0)=0. Now let n⩾1 be an integer such that f(n)=n.
From the above observation, each stone contains a unique upper square. This is particularly the case for the stone containing the square (n,1). But then this stone divides the staircase into two symmetric parts. Thus, each part forms a staircase of size (n−1)/2, such that f((n−1)/2)=(n−1)/2. Consequently, an immediate induction shows that there exists an integer k⩾0 such that n=2k−1.
Conversely, and following this construction in the other direction, an immediate induction shows that f(2k−1)=2k−1 for all integers k⩾0.
The integers n sought are therefore the integers of the form n=2k−1 with k⩾0.
2. This time, we know that n⩾2. Furthermore, the stone containing the square (n,1) cannot contain an upper square; indeed, if it did, it would cut the staircase into two symmetric parts, each forming a staircase of size (n−1)/2, so f(n)−n would have to be even.
It is therefore the only stone that does not contain an upper square. Let ℓ×ℓ be the dimensions of this stone. Once ℓ and n are fixed, each other stone must contain an upper square, and the dimensions of the stones are therefore prescribed. In particular, an immediate induction on n+i−j shows that the stones containing the squares (i,j) and (n+1−j,n+1−i) actually occupy symmetric positions.
In order to reduce the problem to treating only staircases where each stone contains an upper square, we specifically focus on the stones containing the squares (n,1), (n−ℓ,1), (n,ℓ+1), and (n−ℓ,ℓ+1); the latter stone exists only if n=2ℓ.
We first assume that n=2ℓ. In this case, our four stones are pairwise disjoint, with respective sizes ℓ×ℓ, (n+1−ℓ)/2, (n+1−ℓ)/2, and (n+1−2ℓ)/2, and they cut the staircase into four small staircases: two staircases of size (n−1−ℓ)/2 and two staircases of size (n−1−2ℓ)/2. Given the results of the first question, there therefore exist two non-zero natural numbers k and k′ such that n=2k+ℓ−1=2k′+2ℓ−1.
This means that ℓ=2k−2k′, so k⩾k′ and n=2k+1−2k′−1. Conversely, if there exist integers k⩾k′⩾1 such that n=2k+1−2k′−1, it is indeed sufficient to choose ℓ=2k−2k′ for our construction to work.
Similarly, if n=2ℓ, we actually have three stones, which cut the staircase into four small staircases of size (n−1−ℓ)/2=(ℓ−1)/2, so there exists a non-zero natural number k such that ℓ=2k−1 and n=2k+1−2. Conversely, if there exists an integer k⩾1 such that n=2k+1−2, it is indeed sufficient to choose ℓ=n/2 for our construction to work. The integers n sought are therefore the integers of the form n=2k+1−2k′−1 with k⩾k′⩾0.
## Exercise for both Junior and Senior groups