Max size of $B \subset \{1, 2, \ldots, 3n+1\}$ for which no distinct $x, y, z \in B$ have sum in $B$ Given a set $$A=\{1,2,3,\ldots,3n,3n+1\},(n\in N^*)$$   
Let $B$ be a subset of $A$, such that for any distinct $x, y, z\in B$, we have $x+y+z\not \in B$. 
Find the maximum number of elements $B$ can have.
I think the answer is $|B|=2n+2$, because if $$B=\{n,n+1,n+2,n+3,\cdots,3n,3n+1\}$$
then $|B|=2n+2$, and $n+n+1+n+2=3n+3>3n+1$.
But I cannot prove why the conjecture that $\max|B|=2n+2$ holds.
Example: For $n=2$. Then $A=\{1,2,3,4,5,6,7\}$.
Let $B=\{2,3,4,5,6,7\}$; note $|B|\neq 7$, otherwise $B=A$, for which $1+2+3=6$.
 A: Consider the general case, where $A=\{1, 2, 3, \dots, k\}$ for any positive integer, where $k$ is not restricted to be of the form $3n+1$ (however, so that I can write $\left\lfloor\frac{k}{3}\right\rfloor$ later, I will restrict $k\geq 3$).
I will show by induction that there is no subset $B$ of $A$ where no three distinct elements of $B$ sum to another element of $B$ that is larger than $B=\{\left\lfloor\frac{k}{3}\right\rfloor, \left\lfloor\frac{k}{3}\right\rfloor+1, \left\lfloor\frac{k}{3}\right\rfloor+2, \dots, k\}$ (note that I will refer to this subset as $B$ from now on), and in the case when $k\equiv2\pmod3$, this is the unique such subset.
First, an observation: if we have such a maximal subset that contains more elements than a maximal subset of the case when $A=\{1, 2, 3, \dots, k-1\}$, then it must contain $k$, and removing $k$ from this maximal subset must give a maximal subset for when $A=\{1, 2, 3, \dots, k-1\}$.  If it does not contain $k$, then it must be a maximal subset for when $A=\{1, 2, 3, \dots, k-1\}$.
The base case where $k=3$ is obvious.
For the inductive step, there are three cases:
Case 1: $k=3l+2$ for some positive integer $l$.
Proof: Assume for the sake of contradiction that there were another such subset $B'$ with the same size or larger.  Then it must contain some element less than $\left\lfloor\frac{k}{3}\right\rfloor$.  Let $n$ be the number of such elements.  Then, because there are at least as many elements in $B'$ as in $B$, the number of elements in $B'$ that are at least $\left\lfloor\frac{k}{3}\right\rfloor$ is at most $n$.  I will derive a contradiction by showing that there must be at least $n+1$ such elements.
Denote by $x$ the largest element in $B'$ that is less than $\left\lfloor\frac{k}{3}\right\rfloor$.  By the inductive hypothesis and the observation, $B'$ must contain $k$.  Then, by the condition, for any element $y$ of $B'$ less than $\left\lfloor\frac{k}{3}\right\rfloor$ other than $x$, $k-x-y$ must not be in the set.  Note that these are all distinct, and that the lowest possible value of $k-x-y$ when given $x$ is $k-x-(x-1)$  This minimum value will become important later, but for now just note that $k-x-(x-1)\geq 3l+2-l-l+1=l+3>l=\left\lfloor\frac{k}{3}\right\rfloor$.  This gives $n-1$ numbers that cannot be elements of $B'$ that are at least $\left\lfloor\frac{k}{3}\right\rfloor$, so we need 2 more to derive a contradiction.
To find two more, note that $x+(l)+(k-x-l)=k$.  Hence, either $l$ or $k-x-l$ must not be in $B'$.  Similarly, either $l+1$ or $k-x-(l-1)$ must not be in $B'$.
To complete this case, I must show that none of these 4 numbers can be any of the numbers removed earlier, that they are all at least $l=\left\lfloor\frac{k}{3}\right\rfloor$, and that no two of these 4 are the same.
First, from $k-x-(x-1)\geq l+3$, we have that $l<l+1<l+3\leq k-x-(x-1)$, so they cannot be any of those removed earlier.  Now note that $l>x$, so $l-1>x-1$, so $k-x-l<k-x-(l-1)<k-x-(x-1)$, so they cannot be any of those removed earlier either.
To show that they are all at least $l$, we first have $l=l<l+1$.  For the other two, note that $k-x-(l-1)>k-x-l=3l+2-x-l=2l-x+2>l$, so those two must be at least $l$.
To show that these 4 are distinct, it is sufficient to show that $l+1<k-x-l=3l+2-x-l=2l+2-x$, which is equivalent to showing that $x<l+1$, which is true, so we are done.
Case 2: $k=3l$ for some $l$.
Assume for the sake of contradiction that there were some larger subset $B'$ with the constraint.  Then by the observation, $k\in B'$, and removing $k$ from $B'$ must give a maximal subset for when $A=\{1, 2, 3, \dots, k-1\}$, and by the inductive hypothesis, the only such subset is $\{\left\lfloor\frac{k-1}{3}\right\rfloor, \left\lfloor\frac{k-1}{3}\right\rfloor+1, \left\lfloor\frac{k-1}{3}\right\rfloor+2, \dots, k-1\}=\{l-1, l, l+1, \dots, k-1\}$.  However, we cannot add $k$ to this set because $(l-1)+l+(l+1)=3l=k$, contradiction.  (Note, however, this in this case, the $B$ mentioned above is not the only set of this size; for example, we could exchange the lowest element of $B$ with the number one less. I think using a method similar to that used in Case 1 we can get that there are only 4 possible such subsets of this size, achieved using similar methods as the mentioned second example, but I'm not really in the mood right now.)
Case 3: $k = 3l+1$ for some $l$.
Assume for the sake of contradiction some counterexample $B'$ exists.  Then the maximum size of such a subset increased by 2 when $k$ changed from $3l$ to $3l+1$, contradicting the observation.
