TITLE: List of integers without any arithmetic progression of n terms
QUESTION [16 upvotes]: Let's consider a positive integer $n$ and the list of the $n^2$ integers from $1$ to $n^2$. What is the minimum number $f(n)$ of integers to be cancelled in this list so that it is impossible to form  any arithmetic progression of $n$ terms with the remaining integers?

REPLY [12 votes]: EDIT: The original values of $f$ that I reported were the result of a buggy program, as noted by Wolfgang in the comments.  I have fixed the bug and corrected the results.

This problem is easily coded up as an integer linear program.  For $1\le i\le n^2$, let $x_i$ be a 0-1 variable indicating whether $i$ is chosen.  Minimize $\sum_i x_i$ subject to the constraints $\sum_{a\in A} x_a \ge 1$ for every arithmetic progression $A$ of interest.
Assuming no bugs in my program, it took CPLEX only a few minutes to extend JiK's list of small values to:
$$
\begin{align}
f(8)&=13 &&\{6,13,18,23,28,36,37,38,39,40,43,50,57\} \\
f(9)&=15 &&\{8,15,22,29,32,41,42,43,44,45,46,54,61,68,75\} \\
f(10)&=16 &&\{10,15,22,29,36,43,53,55,56,57,58,68,73,74,84,91\}\\
f(11)&=18 && \{11,22,33,44,55,60,66,68,72,76,77,85,92,97,99,102,106,111\}
\end{align}
$$
The last of these took less than 15 minutes on a six-core machine (about 400,000 "ticks" in CPLEX parlance).
I'm sure that cleverer techniques could push the computation further, but this is already enough to show that the OEIS doesn't already know about this sequence.