Let $A$ be a subset of $\{1,2,\ldots,2020\}$ such that the difference of any two distinct elements in $A$ is not prime. Determine the maximum number of elements in set $A$.
Problem
Source: Indonesian Stage 1 TST for IMO 2022, Test 4 (Combinatorics)
Tags: combinatorics, counting
05.01.2022 15:52
any solution?
05.01.2022 21:14
I think the answer is $\boxed{505}$. We can form $A$ as: $A=\{1,5,9,...,2017\}$, $A=\{2,6,10,...,2018\}$ $A=\{3,7,11,...,2019\}$ and $A=\{4,8,12,...,2020\}$ Assume that $|A|>505$. We will seperate $\{1,2,...,2020\}$ into 505 subsets which form as $\{4k+1,4k+2,4k+3,4k+4\}, k=0,1,2,...,504$. Because $|A|>505$, so by Dirichlet, there are at least 2 number would be in one of 505 subsets. WLOG, call it $4m+a$ and $4m+b$. Because $1\leq |a-b| \leq 3$ so the difference between 2 numbers would be prime, contradicts.
05.01.2022 22:36
How about $|a - b| = 1$? @above
06.01.2022 00:02
If I'm not mistake at most $5$ of $20$ consecutive numbers can be element of $A$, which $\frac{1}{4}$ of $20$. So the result follows immediately. (Answer is $505$)
06.01.2022 03:08
RevolveWithMe101 wrote: How about $|a - b| = 1$? @above A good question. You can follow these basic cases (other cases is similar as using transformation)
Attachments:

