Solution:
The set M={1016,1017,…,2021} has 1006 elements and satisfies the required property, since a,b,c∈M implies that a+b−c⩾1016+1016−2021=11.
We will show that this is optimal.
Suppose M satisfies the condition in the problem. Let k be the minimal element of M. Then k=∣k+k−k∣>10⇒k⩾11. Note also that for every m, the integers m,m+k−10 cannot both belong to M, since k+m−(m+k−10)=10.
Claim 1: M contains at most k−10 out of any 2k−20 consecutive integers.
Proof: We can partition the set {m,m+1,…,m+2k−21} into k−10 pairs as follows:
{m,m+k−10},{m+1,m+k−9},…,{m+k−11,m+2k−21}
It remains to note that M can contain at most one element of each pair.
Claim 2: M contains at most [(t+k−10)/2] out of any t consecutive integers.
Proof: Write t=q(2k−20)+r with r∈{0,1,2,…,2k−21}. From the set of the first q(2k−20) integers, by Claim 1 at most q(k−10) can belong to M. Also by Claim 1, it follows that from the last r integers, at most min{r,k−10} can belong to M.
Thus,
- If r⩽k−10, then at most
q(k−10)+r=2t+r⩽2t+k−10 integers belong to M
- If r>k−10, then at most
q(k−10)+k−10=2t−r+2(k−10)⩽2t+k−10 integers belong to M
By Claim 2, the number of elements of M amongst k+1,k+2,…,2021 is at most
[2(2021−k)+(k−10)]=1005
Since amongst {1,2,…,k} only k belongs to M, we conclude that M has at most 1006 elements as claimed.