Let $A=\{x_1,x_2,\cdots,x_n\}$ be a set of $n$ distinct real numbers. Show that there exists a set $B\subset A$ such that $$|B|\geq\lfloor\sqrt{2n}+\frac12\rfloor$$ and no $3$ distinct elements of $B$ constitute an arithmetic progression.
I have no idea how to approach this problem, with its strange-looking formula. I've already posted it on AoPS but no reply.
This is much weaker:
Call a subset of $A$ good if it has no $3$-element arithmetic progression.
Let $X$ be a maximal good subset of $A$ and let $m=|X|$, then for every other point $x\in A\setminus X$ there is a two element subset $\{a,b\}\subseteq X$ so that $x,a$ and $b$ form a progression in some order.
Notice that each subset can form a progression with at most $3$ other points.
So $3\binom{m}{2}\geq n-m\implies 3m(m-1)\geq 2n-2m\implies 3m^2-m\geq2n\iff m\geq\frac{\sqrt{24 n+1}+1}{6}$