TITLE: Largest subset of { 0, 1, 2, ..., n } that has no 3+ element arithmetic progressions?
QUESTION [5 upvotes]: Out of all the subsets of $\lbrace 0, 1, 2, ..., n \rbrace$ for some given $n$, how do I compute the size of the largest subset that has no arithmetic progressions with 3 or more elements?
I suspect this may be a well researched problem but I can't seem to divine the appropriate search terms.

REPLY [3 votes]: This is related to  Szemerédi's theorem. For progressions of length 3, look at a result by Roth. The Wikipedia page suggests that the best known bound is $$O\left(\frac{n (\log\log n)^5}{\log n}\right)$$ I don't think exact values are known except for small values of $n$.