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 A020658 #34 Aug 19 2023 19:04:02 %S A020658 1,2,3,4,5,6,8,9,10,11,12,13,15,16,17,18,19,20,22,23,24,25,26,27,29, %T A020658 30,31,32,33,34,36,37,38,39,40,41,50,51,52,53,54,55,57,58,59,60,61,62, %U A020658 64,65,66,67,68,69,71,72,73,74,75,76,78,79,80,81,82,83,85,86,87,88,89,90,99 %N A020658 Lexicographically earliest increasing sequence of positive numbers that contains no arithmetic progression of length 7. %C A020658 This is different from A047304: note the gap between 41 and 50. - _M. F. Hasler_, Oct 07 2014 %H A020658 Robert Israel, <a href="/A020658/b020658.txt">Table of n, a(n) for n = 1..10000</a> %F A020658 a(n) = A020657(n)+1. - _M. F. Hasler_, Oct 07 2014 %p A020658 Noap:= proc(N,m) %p A020658 # N terms of earliest increasing seq with no m-term arithmetic progression %p A020658 local A,forbid,n,c,ds,j; %p A020658 A:= Vector(N): %p A020658 A[1..m-1]:= <($1..m-1)>: %p A020658 forbid:= {m}: %p A020658 for n from m to N do %p A020658 c:= min({$A[n-1]+1..max(max(forbid)+1, A[n-1]+1)} minus forbid); %p A020658 A[n]:= c; %p A020658 ds:= convert(map(t -> c-t, A[m-2..n-1]),set); %p A020658 for j from m-2 to 2 by -1 do %p A020658 ds:= ds intersect convert(map(t -> (c-t)/j, A[m-j-1..n-j]),set); %p A020658 if ds = {} then break fi; %p A020658 od; %p A020658 forbid:= select(`>`,forbid,c) union map(`+`,ds,c); %p A020658 od: %p A020658 convert(A,list) %p A020658 end proc: %p A020658 Noap(100, 7); # _Robert Israel_, Jan 04 2016 %t A020658 Select[Range[0, 100], FreeQ[IntegerDigits[#, 7], 6]&] + 1 (* _Jean-François Alcover_, Aug 18 2023, after _M. F. Hasler_ *) %Y A020658 Cf. A047304. %Y A020658 Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first): %Y A020658 3-term AP: A005836 (>=0), A003278 (>0); %Y A020658 4-term AP: A005839 (>=0), A005837 (>0); %Y A020658 5-term AP: A020654 (>=0), A020655 (>0); %Y A020658 6-term AP: A020656 (>=0), A005838 (>0); %Y A020658 7-term AP: A020657 (>=0), A020658 (>0); %Y A020658 8-term AP: A020659 (>=0), A020660 (>0); %Y A020658 9-term AP: A020661 (>=0), A020662 (>0); %Y A020658 10-term AP: A020663 (>=0), A020664 (>0). %K A020658 nonn %O A020658 1,2 %A A020658 _David W. Wilson_