Maths Olympiad Prep

Library / /14 of 33

Combinatorics Difficulty 7.9 National olympiad, round 2 Prove it Turkey

Find the number of partitions of {1,2,,2012}\{1, 2, \dots, 2012\} into two sets such that none of the sets contains two distinct elements whose sum is a power of 22.

Solution

**The answer is 10241024.**
Let us call a partition of {1,2,,n}\{1, 2, \dots, n\} into two sets *nice partition for nn*, if none of the sets contains two distinct elements whose sum is a power of 22. Let pnp_n be the number of nice partitions for nn. We observe that removing nn from a nice partition for nn gives a nice partition for n1n-1. Therefore, we can obtain the nice partitions for nn by adding nn to the nice partitions for n1n-1.
If 2m<n<2m+12^m < n < 2^{m+1} for some positive integer mm, then as 2m<n+1n+(n1)<2m+22^m < n+1 \le n + (n-1) < 2^{m+2} and 12m+1nn11 \le 2^{m+1}-n \le n-1, we must add nn into the set not containing 2m+1n2^{m+1}-n. Therefore, pn=pn1p_n = p_{n-1}.
If n=2mn = 2^m for some positive integer mm, then since 2m<n+1n+(n1)<2m+12^m < n + 1 \le n + (n-1) < 2^{m+1}, we can add nn into any of the sets and hence pn=2pn1p_n = 2 \cdot p_{n-1}.
As p2=2p_2 = 2 and 210<2012<2112^{10} < 2012 < 2^{11}, we conclude that p2012=210=1024p_{2012} = 2^{10} = 1024.

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 and solution reproduced as published; topic and difficulty added by this site.