OFFSET
1,3
LINKS
David W. Wilson, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A005838(n) - 1.
EXAMPLE
5 is excluded since (0,1,2,3,4,5) would be a 6-term AP.
10 is excluded since (0,2,4,6,8,10) would be a 6-term AP.
Idem for 15 and 20.
25 is not excluded, but after 25 (1,6,11,16,21,26) would be a 6-AP, and similarly all of 26 through 32 are excluded.
PROG
(PARI) A020656(n, show=1, i=0, o=6, u=0)={for(n=1, n, show&&print1(i, ", "); u+=1<<i; while(i++, for(s=1, i\(o-1), for(j=1, o-1, bittest(u, i-s*j)||next(2)); next(2)); next(2))); i} \\ M. F. Hasler, Jan 03 2016
CROSSREFS
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
KEYWORD
nonn
AUTHOR
EXTENSIONS
Edited by M. F. Hasler, Jan 03 2016
Further edited (with new offset) by N. J. A. Sloane, Jan 04 2016
STATUS
approved