OFFSET
0,2
COMMENTS
Lexicographic first increasing sequence with a(0) = 0, a(1) = 3 and for all n > 1, {a(0), ..., a(n)} does not contain 5 terms in arithmetic progression.
LINKS
R. A. Moy and D. Rolnick, Novel structures in Stanley sequences, Discrete Math., 339 (2016), 689-698. Also arXiv:1502.06013 [math.CO], 2015.
A. M. Odlyzko and R. P. Stanley, Some curious sequences constructed with the greedy algorithm, 1978.
PROG
(PARI) A266728(n, show=1, L=5, v=[0, 3], D=v->v[2..-1]-v[1..-2])={ while(#v<=n, show&&print1(v[#v]", "); v=concat(v, v[#v]); while(v[#v]++, forvec(i=vector(L, j, [if(j<L, j, #v), #v]), #Set(D(vecextract(v, i)))>1||next(2), 2); break)); v[n+1]} \\ M. F. Hasler, Jan 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jan 04 2016
EXTENSIONS
More terms from M. F. Hasler, Jan 18 2016
STATUS
approved