Skip to main content

AMC 12 Mock Exam 8 Problem 25

Problem 25 of 25

Let SS be the set of all positive integers n≤100n\le100 that are the product of two distinct primes; for example, 66, 3535, and 9494 are in SS, but 44, 3030, and 9797 are not. How many subsets of SS, including the empty set, have the property that the product of their elements is a perfect square? (The product of the elements of the empty set is 11.)

Answer choices

Show solution

Solution

The set SS. Its elements are 2p2p for the 1414 odd primes p≤47p\le47; 3p3p for the 99 primes 5≤p≤315\le p\le31; 5p5p for the 55 primes 7≤p≤197\le p\le19; and 7⋅117\cdot11, 7⋅137\cdot13 (22 numbers). Since 11⋅13>10011\cdot13>100, there are no others, so ∣S∣=14+9+5+2=30|S|=14+9+5+2=30. Call the 1616 elements not divisible by 22 the odd elements; each is a product of two odd primes.

Reformulation. Every element is squarefree, so a product of elements of a subset TT is a perfect square exactly when every prime divides an even number of the elements of TT.

First insight: the odd elements can be chosen freely, and then everything else is forced. Fix any set UU of odd elements (2162^{16} choices). For each odd prime p≤47p\le47, let dpd_p be the number of elements of UU divisible by pp. The only other element of SS divisible by pp is 2p2p, so for the exponent of pp to be even we must include 2p2p exactly when dpd_p is odd. Thus UU extends in at most one way, namely T=U∪{2p:dp odd}T=U\cup\{2p: d_p \text{ odd}\}, and in TT every odd prime appears an even number of times.

Second insight: the prime 22 takes care of itself. The exponent of 22 in the product over TT is the number of odd primes pp with dpd_p odd. But ∑pdp=2∣U∣\sum_p d_p=2|U|, since each odd element is divisible by exactly two odd primes, and this sum is even. So the number of odd dpd_p is even (the handshake lemma), and the exponent of 22 is even as well. Hence every UU extends in exactly one way.

The number of subsets with a square product is therefore 216\boxed{2^{16}}.

(Equivalently: think of the primes as 1515 vertices and the elements of SS as 3030 edges of a connected graph; the answer is 230−15+12^{30-15+1}. The distractor 215=230−152^{15}=2^{30-15} forgets that the condition at the last prime is automatic, and 2302^{30} counts all subsets.)

Tagged: square products of semiprimes: forcing by the prime 2 and the handshake lemma