Maths Olympiad Prep

Library / /58 of 87

Number theory Difficulty 6.7 National Olympiad Prove it Serbia

Problem:

For an integer a,a0a, a \neq 0, denote by v2(a)v_{2}(a) the largest nonnegative integer kk such that 2ka2^{k} \mid a. For a given nNn \in \mathbb{N}, determine the largest possible cardinality of a subset AA of the set {1,2,3,,2n}\{1,2,3, \ldots, 2^{n}\} with the following property:
for all x,yA,xy, the number v2(xy) is even.  \text{for all } x, y \in A, x \neq y, \text{ the number } v_{2}(x-y) \text{ is even. }

Solution

Solution:

We shall prove by induction on kk that the set AA contains at most 2k2^{k} distinct elements modulo 22k2^{2k}. This trivially holds for k=0k=0. Let k>0k>0. By the induction hypothesis, the elements of the set AA give at most 2k12^{k-1} residues modulo 22k22^{2k-2}. Suppose that the elements of AA give more than 2k2^{k} residues modulo 22k2^{2k}. By the Pigeonhole Principle, at least three of these residues are equal modulo 22k22^{2k-2}. But among these three residues, two differ by 22k1(mod 22k)2^{2k-1}(\bmod\ 2^{2k}), contrary to the condition of the problem.
It follows that A2[n+12]|A| \leqslant 2^{\left[\frac{n+1}{2}\right]}. An example of a set AA with 2[n+12]2^{\left[\frac{n+1}{2}\right]} elements is obtained by including numbers of the form iB4i\sum_{i \in B} 4^{i} for all subsets BB of the set {0,1,,[n12]}\{0,1, \ldots,\left[\frac{n-1}{2}\right]\}.

Second solution. We say that a set XX is happy if v2(xy)v_{2}(x-y) is even for all x,yX(xy)x, y \in X(x \neq y), and unhappy if v2(xy)v_{2}(x-y) is odd for all x,yX(xy)x, y \in X(x \neq y). Denote by ana_{n} and bnb_{n}, respectively, the maximal cardinalities of a happy and an unhappy subset of the set Tn={1,2,,2n}T_{n}=\{1,2, \ldots, 2^{n}\}.
Consider a happy set ATn,n1A \subset T_{n}, n \geqslant 1. Since v2(2x2y)=v2(xy)+1v_{2}(2x-2y)=v_{2}(x-y)+1, the sets A0={x2xA,2x}A_{0}=\left\{\frac{x}{2}\mid x \in A, 2\mid x\right\} and A1={x12xA,2x}A_{1}=\left\{\left.\frac{x-1}{2} \right| x \in A, 2 \nmid x\right\} are unhappy subsets of the set Tn1T_{n-1} and have at most bn1b_{n-1} elements each. On the other hand, if A0Tn1A_{0} \subset T_{n-1} is an unhappy set, the set {2x,2x+1xA0}Tn\{2x, 2x+1 \mid x \in A_{0}\} \subset T_{n} is happy and has 2A02|A_{0}| elements. It follows that an=2bn1a_{n}=2b_{n-1}.
Similarly, if BTnB \subset T_{n} is an odd set, all of its elements have the same parity, and the set B={x2xB}Tn1B' = \left\{\left.\left\lceil\frac{x}{2}\right\rceil \right| x \in B\right\} \subset T_{n-1} is happy. On the other hand, if BTn1B' \subset T_{n-1} is happy, the set B={2x1xB}TnB=\{2x-1 \mid x \in B'\} \subset T_{n} is unhappy. From this, bn=an1b_{n}=a_{n-1}.
The relations obtained give an=2an2a_{n}=2a_{n-2} for n2n \geqslant 2, so from a0=1a_{0}=1 and a1=2a_{1}=2, by simple induction we obtain an=2[n+12]a_{n}=2^{\left[\frac{n+1}{2}\right]}.

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: MathNet, licensed CC-BY-4.0. Statement translated into English from sr; metadata (topic, difficulty) added by this project.