Olympiad Maths Prep

Track / Stage 6 / 138 of 400 #1138 of 2000

Problem 1138

National olympiad, first round
Combinatorics Difficulty 6.2 Prove it

4. Let's say a set of positive integers is square if it is non-empty, finite, and the product of all its elements is a square of an integer. Prove that the set {1,2,3,,20}\{1,2,3, \ldots, 20\} has exactly 21212^{12}-1 square subsets.

(Josef Tkadlec)

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

Solution. We know that a natural number is a square if and only if each prime number in its prime factorization appears an even number of times. The prime numbers in the set Z={1,2,3,,20} Z = \{1, 2, 3, \ldots, 20\} form the set P={2,3,5,7,11,13,17,19} P = \{2, 3, 5, 7, 11, 13, 17, 19\} , and the remaining 12 numbers (1 and the composite numbers) form the set

Q={1,4,6,8,9,10,12,14,15,16,18,20} Q = \{1, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20\}

Since no square subset of the set Z Z can consist entirely of elements from P P , it must contain at least one number from Q Q .

Let's explain why, on the other hand, from the 2121 2^{12} - 1 non-empty subsets X X of the set Q Q , each can be uniquely supplemented with primes from P P to form a square set (or it is not necessary or possible to add any prime from P P if the set X X is already square). This follows from the fact that for a given non-empty subset XQ X \subseteq Q , the supplementary primes from P P must be exactly those that appear an odd number of times in the prime factorization of the number equal to the product of the elements of X X . The square sets thus created, in the number 2121 2^{12} - 1 (=4095), are clearly distinct (since each has a different intersection with the set Q Q ), so the number of all square subsets of the set Z Z is indeed equal to 2121 2^{12} - 1 , as we were to prove.

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