CombinatoricsDifficulty 5.8AIME, harderFind the answer
Let A be a set of positive integers with the following properties:
(a) If n is an element of A then n⩽2018.
(b) If S is a subset of A with ∣S∣=3 then there are two elements n,m of S with ∣n−m∣⩾n+m.
What is the maximum number of elements that A can have?
A number or a short expression. Spacing and $ signs are ignored.
Solution
Assuming n>m we have
∣n−m∣⩾n+m⇔(n−m)(n+m)⩾n+m⇔n⩾m+1.
Let Ak={k2,k2+1,…,(k+1)2−1}. Note that each Ak can contain at most two elements since if n,m∈Ak with n>m then
n−m⩽(k+1)2−1−k2<(k+1)−k=1
In particular, since S⊆A1∪⋯∪A44, we have ∣S∣⩽2⋅44=88.
On the other hand, we claim that A={m2:1⩽m⩽44}∪{m2+m:1⩽m⩽44} satisfies the properties and has ∣A∣=88. We check property (b) as everything else is trivial.
So let r,s,t be three elements of A and assume r<s<t. There are two cases for r.
(i) If we have that r=m2, then t⩾(m+1)2 and so t−r≥1 verifying (b).
(ii) If we have that r=m2+m, then t⩾(m+1)2+(m+1) and