Let m, n and l be positive integers satisfying m ≦ n ≦ l ≦ 3. Denote by h(m, n, l) the largest integer with the property that from every n-subset of {1,2, …, m} one can select h(m, n, l) integers no l of which are in arithmetic progression. Let f(n, l) = h(n, n, l) and let g(n, l) = minmh(m, n, l). In what follows, by a P1-free set we shall mean a set of integers not containing an arithmetic progression of length l.