OFFSET
1,2
COMMENTS
This is different from A047304: note the gap between 41 and 50. - M. F. Hasler, Oct 07 2014
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A020657(n)+1. - M. F. Hasler, Oct 07 2014
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, 7); # Robert Israel, Jan 04 2016
MATHEMATICA
Select[Range[0, 100], FreeQ[IntegerDigits[#, 7], 6]&] + 1 (* Jean-François Alcover, Aug 18 2023, after M. F. Hasler *)
CROSSREFS
Cf. A047304.
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
STATUS
approved