This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A020664 #13 Jan 04 2016 20:28:04 %S A020664 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28, %T A020664 31,32,33,34,35,36,37,38,39,41,42,43,44,45,49,50,51,52,53,54,55,58,59, %U A020664 60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,77,78,81,82,83,84,85,88,89,96,97 %N A020664 Lexicographically earliest increasing sequence of positive numbers that contains no arithmetic progression of length 10. %H A020664 Robert Israel, <a href="/A020664/b020664.txt">Table of n, a(n) for n = 1..10000</a> %p A020664 Noap:= proc(N,m) %p A020664 # N terms of earliest increasing seq with no m-term arithmetic progression %p A020664 local A,forbid,n,c,ds,j; %p A020664 A:= Vector(N): %p A020664 A[1..m-1]:= <($1..m-1)>: %p A020664 forbid:= {m}: %p A020664 for n from m to N do %p A020664 c:= min({$A[n-1]+1..max(max(forbid)+1, A[n-1]+1)} minus forbid); %p A020664 A[n]:= c; %p A020664 ds:= convert(map(t -> c-t, A[m-2..n-1]),set); %p A020664 for j from m-2 to 2 by -1 do %p A020664 ds:= ds intersect convert(map(t -> (c-t)/j, A[m-j-1..n-j]),set); %p A020664 if ds = {} then break fi; %p A020664 od; %p A020664 forbid:= select(`>`,forbid,c) union map(`+`,ds,c); %p A020664 od: %p A020664 convert(A,list) %p A020664 end proc: %p A020664 Noap(100,10); # _Robert Israel_, Jan 04 2016 %Y A020664 Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first): %Y A020664 3-term AP: A005836 (>=0), A003278 (>0); %Y A020664 4-term AP: A005839 (>=0), A005837 (>0); %Y A020664 5-term AP: A020654 (>=0), A020655 (>0); %Y A020664 6-term AP: A020656 (>=0), A005838 (>0); %Y A020664 7-term AP: A020657 (>=0), A020658 (>0); %Y A020664 8-term AP: A020659 (>=0), A020660 (>0); %Y A020664 9-term AP: A020661 (>=0), A020662 (>0); %Y A020664 10-term AP: A020663 (>=0), A020664 (>0). %K A020664 nonn %O A020664 1,2 %A A020664 _David W. Wilson_