Maths Olympiad Prep

Library / /25 of 64

Combinatorics Difficulty 7.8 National olympiad, round 2 Find the answer

Call a subset SS of {1,2,,n}\{1, 2, \dots, n\} \emph{mediocre} if it has the following property:
Whenever aa and bb are elements of SS whose average is an integer, that average is also
an element of SS. Let A(n)A(n) be the number of mediocre subsets of {1,2,,n}\{1,2,\dots,n\}.
[For instance, every subset of {1,2,3}\{1,2,3\} except {1,3}\{1,3\} is mediocre, so A(3)=7A(3) =7.]
Find all positive integers nn such that A(n+2)2A(n+1)+A(n)=1A(n+2) - 2A(n+1) + A(n) = 1.

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

Solution

The answer is n=2k1n=2^k-1 for some integer k1k\geq 1.
There is a bijection between mediocre subsets of {1,,n}\{1,\ldots,n\} and
mediocre subsets of {2,,n+1}\{2,\ldots,n+1\} given by adding 11 to each
element of the subset; thus A(n+1)A(n)A(n+1)-A(n) is the number of mediocre
subsets of {1,,n+1}\{1,\ldots,n+1\} that contain 11. It follows that
A(n+2)2A(n+1)+An=(A(n+2)A(n+1))(A(n+1)A(n))A(n+2)-2A(n+1)+A_n = (A(n+2)-A(n+1))-(A(n+1)-A(n)) is the difference
between the number of mediocre subsets of {1,,n+2}\{1,\ldots,n+2\} containing
11 and the number of mediocre subsets of {1,,n+1}\{1,\ldots,n+1\} containing
11. This difference is precisely the number of mediocre subsets of
{1,,n+2}\{1,\ldots,n+2\} containing both 11 and n+2n+2, which we term
"mediocre subsets containing the endpoints." Since {1,,n+2}\{1,\ldots,n+2\}
itself is a mediocre subset of itself containing the endpoints, it
suffices to prove that this is the only mediocre subset of
{1,,n+2}\{1,\ldots,n+2\} containing the endpoints if and only if n=2k1n=2^k-1 for
some kk.

If nn is not of the form 2k12^k-1, then we can write n+1=2abn+1 = 2^a b for
odd b>1b>1. In this case, the set {1+mb0m2a}\{1+m b \, | \, 0 \leq m \leq 2^a\}
is a mediocre subset of {1,,n+2}\{1,\ldots,n+2\} containing the endpoints: the
average of 1+m1b1+m_1 b and 1+m2b1+m_2 b, namely 1+m1+m22b1+\frac{m_1+m_2}{2} b, is
an integer if and only if m1+m2m_1+m_2 is even, in which case this average
lies in the set.

It remains to show that if n=2k1n=2^k-1, then the only mediocre subset of
{1,,n+2}\{1,\ldots,n+2\} containing the endpoints is itself. This is readily
seen by induction on kk. For k=1k=1, the statement is obvious. For
general kk, any mediocre subset SS of {1,,n+2=2k+1}\{1,\ldots,n+2=2^k+1\}
containing 11 and 2k+12^k+1 must also contain their average, 2k1+12^{k-1}+1.
By the induction assumption, the only mediocre subset of
{1,,2k1+1}\{1,\ldots,2^{k-1}+1\} containing the endpoints is itself, and so SS
must contain all integers between 11 and 2k1+12^{k-1}+1. Similarly, a
mediocre subset of {2k1+1,,2k+1}\{2^{k-1}+1,\ldots,2^k+1\} containing the endpoints
gives a mediocre subset of {1,,2k1+1}\{1,\ldots,2^{k-1}+1\} containing the
endpoints by subtracting 2k12^{k-1} from each element. By the induction
assumption again, it follows that SS must contain all integers between
2k1+12^{k-1}+1 and 2k+12^k+1. Thus S={1,,2k+1}S = \{1,\ldots,2^k+1\} and the induction
is complete.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.