Maths Olympiad Prep

Library / /405 of 520

Combinatorics Difficulty 7.0 National olympiad Find the answer

Let nn be a natural number. A staircase of size nn is made up of small 1×11 \times 1 squares, with 1 square for the first step, 2 squares for the second step, and so on, up to nn squares for the nthn^{\text{th}} step.
We have square stones (with integer side lengths) of all sizes to build this staircase, and we denote f(n)f(n) as the minimum number of stones needed to build a staircase of size nn. For example, f(2)=3f(2)=3 and f(4)=7f(4)=7, as illustrated below.
!

1. Find all integers n0n \geqslant 0 such that f(n)=nf(n)=n.
2. Find all integers n0n \geqslant 0 such that f(n)=n+1f(n)=n+1.

A number or a short expression. Spacing and $ signs are ignored.

Solution

Let's start with some definitions and general observations. In the following, we denote by (i,j)(i, j) the 1×11 \times 1 small square located at the jj-th level of the ii-th step. We will call the upper square each small square (k,k)(k, k), i.e., each square located at the very top of a step.
We consider the construction of a staircase of size nn using f(n)f(n) square stones. Two distinct upper squares cannot belong to the same stone. Since there are exactly nn upper squares in a staircase of size nn, we deduce that f(n)nf(n) \geqslant n for all n0n \geqslant 0. We now address questions 1 and 2.

1. First, it is clear that f(0)=0f(0)=0. Now let n1n \geqslant 1 be an integer such that f(n)=nf(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)(n, 1). But then this stone divides the staircase into two symmetric parts. Thus, each part forms a staircase of size (n1)/2(n-1) / 2, such that f((n1)/2)=(n1)/2f((n-1) / 2)=(n-1) / 2. Consequently, an immediate induction shows that there exists an integer k0k \geqslant 0 such that n=2k1n=2^{k}-1.
Conversely, and following this construction in the other direction, an immediate induction shows that f(2k1)=2k1f\left(2^{k}-1\right)=2^{k}-1 for all integers k0k \geqslant 0.
The integers nn sought are therefore the integers of the form n=2k1n=2^{k}-1 with k0k \geqslant 0.
2. This time, we know that n2n \geqslant 2. Furthermore, the stone containing the square (n,1)(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 (n1)/2(n-1) / 2, so f(n)nf(n)-n would have to be even.
It is therefore the only stone that does not contain an upper square. Let ×\ell \times \ell be the dimensions of this stone. Once \ell and nn 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+ijn+i-j shows that the stones containing the squares (i,j)(i, j) and (n+1j,n+1i)(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)(n-\ell, 1), (n,+1)(n, \ell+1), and (n,+1)(n-\ell, \ell+1); the latter stone exists only if n2n \neq 2 \ell.
We first assume that n2n \neq 2 \ell. In this case, our four stones are pairwise disjoint, with respective sizes ×\ell \times \ell, (n+1)/2(n+1-\ell) / 2, (n+1)/2(n+1-\ell) / 2, and (n+12)/2(n+1-2 \ell) / 2, and they cut the staircase into four small staircases: two staircases of size (n1)/2(n-1-\ell) / 2 and two staircases of size (n12)/2(n-1-2 \ell) / 2. Given the results of the first question, there therefore exist two non-zero natural numbers kk and kk' such that n=2k+1=2k+21n=2^{k}+\ell-1=2^{k'}+2 \ell-1.

This means that =2k2k\ell=2^{k}-2^{k'}, so kkk \geqslant k' and n=2k+12k1n=2^{k+1}-2^{k'}-1. Conversely, if there exist integers kk1k \geqslant k' \geqslant 1 such that n=2k+12k1n=2^{k+1}-2^{k'}-1, it is indeed sufficient to choose =2k2k\ell=2^{k}-2^{k'} for our construction to work.
Similarly, if n=2n=2 \ell, we actually have three stones, which cut the staircase into four small staircases of size (n1)/2=(1)/2(n-1-\ell) / 2=(\ell-1) / 2, so there exists a non-zero natural number kk such that =2k1\ell=2^{k}-1 and n=2k+12n=2^{k+1}-2. Conversely, if there exists an integer k1k \geqslant 1 such that n=2k+12n=2^{k+1}-2, it is indeed sufficient to choose =n/2\ell=n / 2 for our construction to work. The integers nn sought are therefore the integers of the form n=2k+12k1n=2^{k+1}-2^{k'}-1 with kk0k \geqslant k' \geqslant 0.

## Exercise for both Junior and Senior groups

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.