Maths Olympiad Prep

Library / /128 of 128

Number theory Difficulty 8.0 National Olympiad, round 2 Prove it Philippines

Problem:

The set S={1,2,,2022}S = \{1, 2, \ldots, 2022\} is to be partitioned into nn disjoint subsets S1,S2,,SnS_1, S_2, \ldots, S_n such that for each i{1,2,,n}i \in \{1, 2, \ldots, n\}, exactly one of the following statements is true:

(a) For all x,ySix, y \in S_i with xyx \neq y, gcd(x,y)>1\operatorname{gcd}(x, y) > 1.

(b) For all x,ySix, y \in S_i with xyx \neq y, gcd(x,y)=1\operatorname{gcd}(x, y) = 1.

Find the smallest value of nn for which this is possible.

Solution

Solution:

The answer is 1515.

Note that there are 1414 primes at most 2022\sqrt{2022}, starting with 22 and ending with 4343. Thus, the following partition works for 1515 sets. Let S1={2,4,,2022}S_1 = \{2, 4, \ldots, 2022\}, the multiples of 22 in SS. Let S2={3,9,15,,2019}S_2 = \{3, 9, 15, \ldots, 2019\}, the remaining multiples of 33 in SS not in S1S_1. Let S3={5,25,35,,2015}S_3 = \{5, 25, 35, \ldots, 2015\}, the remaining multiples of 55, and so on and so forth, until we get to S14={43,1849,2021}S_{14} = \{43, 1849, 2021\}. S15S_{15} consists of the remaining elements, i.e., 11 and those numbers with no prime factors at most 4343, i.e., the primes greater than 4343 but less than 20222022: S15={1,47,53,59,,2017}S_{15} = \{1, 47, 53, 59, \ldots, 2017\}.

Each of S1,S2,,S14S_1, S_2, \ldots, S_{14} satisfies (a), while S15S_{15} satisfies (b).

We show now that no partition in 1414 subsets is possible. Let a Type 1 subset of SS be a subset SiS_i for which (a) is true and there exists an integer d>1d > 1 for which dd divides every element of SiS_i. Let a Type 2 subset of SS be a subset SiS_i for which (b) is true. Finally, let a Type 3 subset of SS be a subset SiS_i for which (a) is true that is not a Type 1 subset. An example of a Type 3 subset would be a set of the form {pq,qr,pr}\{pq, qr, pr\} where p,q,rp, q, r are distinct primes.

Claim: Let p1=2,p2=3,p3=5,p_1 = 2, p_2 = 3, p_3 = 5, \ldots be the sequence of prime numbers, where pkp_k is the kkth prime. Every optimal partition of the set S(k):={1,2,,pk2}S(k) := \{1, 2, \ldots, p_k^2\}, i.e., a partition with the least possible number of subsets, has at least k1k-1 Type 1 subsets. In particular, every optimal partition of this set has k+1k+1 subsets in total. To see how this follows, we look at two cases:

- If every prime ppkp \leq p_k has a corresponding Type 1 subset containing its multiples, then a similar partitioning to the above works: Take S1S_1 to SkS_k as Type 1 subsets for each prime, and take Sk+1S_{k+1} to be everything left over. Sk+1S_{k+1} will never be empty, as it has 11 in it. While in fact it is known that, for example, by Bertrand's postulate there is always some prime between pkp_k and pk2p_k^2 so Sk+1S_{k+1} has at least two elements, there is no need to go this far—if there were no other primes you could just move 22 from S1S_1 into Sk+1S_{k+1}, and if k>1k > 1 then S1S_1 will still have at least three elements remaining. And if k=1k = 1, there is no need to worry about this, because 2<3<222 < 3 < 2^2.

- On the other hand, if ppkp \leq p_k has no corresponding Type 1 subset, then pp and p2p^2 will not be contained in a Type 1 set. Neither can pp nor p2p^2 be contained in a Type 3 set. If gcd(p,x)>1\operatorname{gcd}(p, x) > 1 for all xx in the same set as pp, then gcd(p,x)=p\operatorname{gcd}(p, x) = p, which implies that pp is in a Type 1 set with d=pd = p. Similarly, if gcd(p2,x)>1\operatorname{gcd}(p^2, x) > 1 for all xx in the same set as p2p^2, then pgcd(p2,x)p \mid \operatorname{gcd}(p^2, x) for all xx, and so p2p^2 is in a Type 1 set with d=pd = p as well. Hence pp and p2p^2 must in fact be in Type 2 sets, and they cannot be in the same Type 2 set (as they share a common factor of p>1p > 1); this means that the optimal partition has at least k+1k+1 subsets in total. A possible equality scenario for example is the sets S1={1,2,3,5,,pk}S_1 = \{1, 2, 3, 5, \ldots, p_k\}, S2={4,9,25,,pk2}S_2 = \{4, 9, 25, \ldots, p_k^2\}, and S3S_3 to Sk+1S_{k+1} Type 1 sets taking all remaining multiples of 2,3,5,,pk12, 3, 5, \ldots, p_{k-1}. This works, as pkp_k and pk2p_k^2 are the only multiples of pkp_k in S(k)S(k) with no prime factor other than pkp_k and thus cannot be classified into some other Type 1 set.

To prove our claim: We proceed by induction on kk. Trivially, this is true for k=1k = 1. Suppose now that any optimal partition of the set S(k)S(k) has at least k1k-1 Type 1 subsets, and thus at least k+1k+1 subsets in total. Consider now a partition of the set S(k+1)S(k+1), and suppose that this partition would have at most k+1k+1 subsets. From the above, there exist at least two primes p,qp, q with p<qpk+1p < q \leq p_{k+1} for which there are no Type 1 subsets. If q<pk+1q < p_{k+1} we have a contradiction. Any such partition can be restricted to an optimal partition of S(k)S(k) with p<qpkp < q \leq p_k having no corresponding Type 1 subsets. This contradicts our inductive hypothesis. On the other hand, suppose that q=pk+1q = p_{k+1}. Again restricting to S(k)S(k) gives us an optimal partition of S(k)S(k) with at most k1k-1 Type 1 sets; the inductive hypothesis tells us that this partition has in fact exactly k1k-1 Type 1 sets and two Type 2 sets from a previous argument establishing the consequence of the claim. However, consider now the element pqpq. This cannot belong in any Type 1 set, neither can it belong in the same Type 2 set as pp or p2p^2. Thus in addition to the given k1k-1 Type 1 sets and 22 Type 2 sets, we need an extra set to contain pqpq. Thus our partition of S(k+1)S(k+1) in fact has at least k1+2+1=k+2k-1 + 2 + 1 = k+2 subsets, and not k+1k+1 subsets as we wanted. The claim is thus proved.

Returning to our original problem, since p14=43<2022p_{14} = 43 < \sqrt{2022}, any partition of SS must restrict to a partition of S(14)S(14), which we showed must have at least 1515 sets. Thus, we can do no better than 1515.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.