Maths Olympiad Prep

Library / /512 of 860

Number theory Difficulty 5.2 AIME, harder Find the answer

Call a positive integer N2N \geq 2 "special" if for every kk such that 2kN,N2 \leq k \leq N, N can be expressed as a sum of kk positive integers that are relatively prime to NN (although not necessarily relatively prime to each other). How many special integers are there less than 100100?

A number or a short expression. Spacing and $ signs are ignored.

Solution

We claim that all odd numbers are special, and the only special even number is 2. For any even N>2N>2, the numbers relatively prime to NN must be odd. When we consider k=3k=3, we see that NN can't be expressed as a sum of 3 odd numbers. Now suppose that NN is odd, and we look at the binary decomposition of NN, so write N=2a1+2a2++2ajN=2^{a_{1}}+2^{a_{2}}+\ldots+2^{a_{j}} as a sum of distinct powers of 2. Note that all these numbers only have factors of 2 and are therefore relatively prime to NN. We see that j<log2N+1j<\log _{2} N+1. We claim that for any kjk \geq j, we can write NN as a sum of kk powers of 2. Suppose that we have NN written as N=2a1+2a2++2akN=2^{a_{1}}+2^{a_{2}}+\ldots+2^{a_{k}}. Suppose we have at least one of these powers of 2 even, say 2a12^{a_{1}}. We can then write N=2a11+2a11+2a2++2akN=2^{a_{1}-1}+2^{a_{1}-1}+2^{a_{2}}+\ldots+2^{a_{k}}, which is k+1k+1 powers of 2. The only way this process cannot be carried out is if we write NN as a sum of ones, which corresponds to k=Nk=N. Therefore, this gives us all k>log2Nk>\log _{2} N. Now we consider the case k=2k=2. Let 2a2^{a} be the largest power of 2 such that 2a<N2^{a}<N. We can write N=2a+(N2a)N=2^{a}+\left(N-2^{a}\right). Note that since 2a2^{a} and NN are relatively prime, so are N2aN-2^{a} and NN. Note that a<log2Na<\log _{2} N. Now similar to the previous argument, we can write 2a2^{a} as a sum of kk powers of 2 for 1<k<2a1<k<2^{a}, and since 2a>N22^{a}>\frac{N}{2}, we can achieve all kk such that 2k<N2+12 \leq k<\frac{N}{2}+1. Putting these together, we see that since N2+1>log2N\frac{N}{2}+1>\log _{2} N for N3N \geq 3, we can achieve all kk from 2 through NN, where NN is odd.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.