# Do there exist sets of integers with arbitrarily large upper density which contains infinitely many elements that are not in an arithmetic progression of length 3?

Given that simply stipulating positive upper density is not sufficient to guarantee that all but finitely many members are in an arithmetic progression of length 3, that there indeed exists sets of integers with positive density that contain infinitely many elements that are not contained in an arithmetic progression of length 3, are there counterexamples of (upper) density arbitrarily close to 1? In other words, let $0 < \epsilon < 1/2$ be given. Does there exist a set $A$ of positive integers such that the density of $A$ is larger than $1 - \epsilon$ and $A$ contains infinitely many elements that are not in an arithmetic progression of length 3?

To see the constructions when only positive upper density is required, see here Inverse Length 3 Arithmetic Progression Problem for sets with positive upper density

• This is closely related to en.wikipedia.org/wiki/…, which is quite famous. I think that currently, among sets with no arithmetic progressions of length three, the current bound on sums of reciprocals is ~2.7. – Eric Tressler Dec 20 '10 at 17:17

If $a\in A$ is not in an AP of length $3$ then $A$ contains at most $n/2$ terms from $(a,a+n]$. So $A$ has density at most $1/2$. Density $1/3$ is easy to construct: take numbers of the form $3n$ or $4^n$.