A020655 Lexicographically earliest increasing sequence of positive numbers that contains no arithmetic progression of length 5.
1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 63, 64, 66, 67, 68, 69, 76, 77, 78, 79, 81, 82, 83, 84, 86, 87, 88, 89, 91, 92, 93, 94, 126, 127, 128, 129, 131, 132, 133
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Crossrefs
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
Programs
-
Maple
Noap:= proc(N,m) # N terms of earliest increasing seq with no m-term arithmetic progression local A,forbid,n,c,ds,j; A:= Vector(N): A[1..m-1]:= <($1..m-1)>: forbid:= {m}: for n from m to N do c:= min({$A[n-1]+1..max(max(forbid)+1, A[n-1]+1)} minus forbid); A[n]:= c; ds:= convert(map(t -> c-t, A[m-2..n-1]),set); for j from m-2 to 2 by -1 do ds:= ds intersect convert(map(t -> (c-t)/j, A[m-j-1..n-j]),set); if ds = {} then break fi; od; forbid:= select(`>`,forbid,c) union map(`+`,ds,c); od: convert(A,list) end proc: Noap(100, 5); # Robert Israel, Jan 04 2016
-
Mathematica
t = {1, 2, 3, 4}; Do[s = Table[Append[i, n], {i, Subsets[t, {4}]}]; If[! MemberQ[Table[Differences[i, 2], {i, s}], {0, 0, 0}], AppendTo[t, n]], {n, 5, 100}]; t (* T. D. Noe, Apr 17 2014 *)