501 distinct coprime integers between 1 and 1000?

This is exercise 1.6.1 of Guichard

Suppose that 501 distinct integers are selected from 1 . . . 1000. Show that there are distinct selected integers $a$ and $b$ such that $a | b$. Show that this is not always true if 500 integers are selected.

This seems like it should be simple but it's has been stumping me for a few days.

Here's my idea for a proof:

Let $S$ be a set of 500 distinct integers between 1 and 1000 that don't divide each other. Let $S_{1-500}$ and $S_{501-1000}$ partition $S$ into sets containing the elements ≤ and > than 500, respectively. Then consider $2 S_{1-500}$ and $\frac{1}{2}S_{501-1000}$, the result of multiplying the elements of these sets by 2 and 1/2, respectively. Because elements of S are coprime, $S_{1-500}$, $S_{501-1000}$, $2 S_{1-500}$, and $\frac{1}{2}S_{501-1000}$, are disjoint. Also note that each of these sets is a subset of the integers from 1 to 1000. One can deduce that the cardinality of the union of these sets is 1000, and therefore they form a partition of the integers from 1 to 1000.

Now, I know this demonstrates that you can't add another number to $S$ that is coprime with all the elements in $S$, which means that a coprime subset of the integers from 1 to 1000 can have at most 500 elements. Can someone articulate why this is true for me? Also, this was in a section on the Pigeonhole principle, can someone rework the proof to utilize that, and possibly make it simpler? Thanks.


$[1,1000]$ can be partitioned through the following sets: $$ S_1=\{1,2,4,8,\ldots,512\}, $$ $$ S_3=\{3,6,12,24,\ldots,768\}, $$ $$ S_5=\{5,10,20,40,\ldots,640\}, $$ $$ \ldots $$ $$ S_{499}=\{499,998\} $$ plus the singletons $S_{501},S_{503},\ldots,S_{999}$. For short, $n\in[1,1000]$ belongs to $S_{n/2^{\nu_2(n)}}$.

These are $500$ sets: if $501$ elements are picked from $[1,1000]$, at least two elements must lie in the same $S_m$. But every $S_m$ is a chain in the POset given by $a"\leq"b\;\Leftrightarrow a\mid b$, so the claim is straightforward.


I know there's already two answers, but I came up with this last night and thought I'd share as I was very happy with the solution:

Suppose the proposition is false, i.e. there are sets of size 501 where for all a and b in the set, a and b non equal implies a does not divide b.

For each set satisfying this property (of which there are clearly a finite amount), we can find the smallest element in the set. Choose a set where this smallest element is maximal (i.e. there are no sets with this property where the smallest element if bigger than the smallest element in our chosen set). Call this set S, and the smallest element x.

Now we have x = 500, x = 2, or 2 < x < 500 (as if x > 500, there are not enough elements bigger than 500 between x and 1000 to find 501 numbers). If x = 500, then the set must be 500,...,1000 but clearly 500 divides 1000, a contradiction. If x = 2, then we can't have any even numbers in our set, so the only 500 numbers remaining are all odd ones, but then the set would contain 3 and 9, a contradiction.

Thus 2 < x < 500. Now does 2*x belong to our set? Clearly not, as our set satisfies the assumed property (as x divides 2*x and we assume there are no a, b distinct such that a divides b). But as x < 500, 2*x < 1000. Furthermore, 2*x does not divide any elements of our set as if it did, x would also divide that element. Lastly, no element in our set divides 2*x besides x, as x is the smallest element in the set and so if say y divides 2*x, i.e. n*y = 2*x, it implies n is less than 2 and so not an integer.

This means we can replace x by 2*x and our set still has all the required properties. But then we have a set with a bigger smallest element and we chose our set maximal, which is a contradiction.

Thus no set's with this property exist, and we are done.


For more clarity in the general case (i.e. we can show that in an $(n+1)-$subset of $[2n]= \{1,2,\ldots 2n\}$ there exist two numbers, one of which divides the other) consider the following:

Let the $(n+1)-$subset be $\{a_i\}_{i=1}^{n+1}$ and write $a_i = 2^{k}b_i$ where $k$ is the largest power of $2$ that divides $a_i$ so that $b_i$ is odd. Then for $1\leq i \leq n+1, b_i \in [2n-1].$ By the pigeonhole principle, there exists distinct $p ,q \in [2n-1]$ such that $b_p = b_q.$ Then it's clear that one of $a_p, a_q$ divides the other.