OFFSET
1,2
PROG
(PARI) A267307(n, show=0, L=6, o=3, v=[1], D=v->v[2..-1]-v[1..-2])={ my(d, m); 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]), d=D(vecextract(v, i)); m=o; while(m--&&#Set(d=D(d))>1, ); #Set(d)>1||next(2), 2); break)); v[#v]} \\ M. F. Hasler, Jan 12 2016
CROSSREFS
Cf. A267306 (nonnegative variant: starting with 0).
Cf. A240075 and A240555 for sequences avoiding 4-term subsequences with constant second differences.
Cf. A267300 and A267301 for sequences avoiding 5-term subsequences with constant second differences.
Cf. A267302 and A267303 for sequences avoiding 6-term subsequences with constant second differences.
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jan 12 2016
EXTENSIONS
More terms from Jinyuan Wang, Jan 08 2021
STATUS
approved