Let S be a subset of {−n,−n+1,…,n−1,n} of largest size satisfying a+b+c=0 for all a,b,c∈S . First, observe that 0∈/S . Next note that ∣S∣≥⌈n/2⌉ , by observing that the set of all the odd numbers in {−n,−n+1,…,n−1,n} works. To prove that ∣S∣≤⌈n/2⌉ , it suffices to only consider even n , because the statement for 2k implies the statement for 2k−1 as well. So from here forth, assume n is even.
For any two sets A and B , denote by A+B the set {a+b∣a∈A,b∈B} , and by −A the set {−a∣a∈A} . Also, let A+ denote A∩{1,2,…} and A− denote A∩{−1,−2,…} . First, we present a lemma:
Lemma 1 : Let A and B be two sets of integers. Then ∣A+B∣≥∣A∣+∣B∣−1 .
Proof : Write A={a1,…,an} and B={b1,…,bm} where a1<⋯<an and b1<⋯<bm . Then a1+b1,a1+b2,…,a1+bm,a2+bm,…,an+bm is a strictly increasing sequence of n+m−1 integers in A+B .
Now, we consider two cases:
Case 1 : One of n,−n is not in S . Without loss of generality, suppose −n∈/S . Let U={−n+1,−n+2,…,n−2,n−1,n} (a set with 2n elements), so that S⊆U by our assumption. Now, the condition that a+b+c=0 for all a,b,c∈S implies that −S∩(S++S−)=∅ . Since any element of S++S− has absolute value at most n−1 , we have S++S−⊆{−n+1,−n+2,…,n−2,n−1}⊆U . It follows that S++S−⊆U∖−S , so ∣S++S−∣≤2n−∣S∣ . However, by Lemma 1, we also have ∣S++S−∣≥∣S+∣+∣S−∣−1=∣S∣−1 . Therefore, we must have ∣S∣−1≤2n−∣S∣ , or 2∣S∣≤2n+1 , or ∣S∣≤n .
Case 2 : Both n and −n are in S . Then n/2 and −n/2 are not in S , and at most one of each of the pairs {1,n−1},{2,n−2},…,{2n−1,2n+1} and their negatives are in S . This means S contains at most 2+(n−2)=n elements.
Thus we have proved that ∣S∣≤n=⌈n/2⌉ for even n , and we are done.