A267304 Earliest nonnegative increasing sequence having no 7-term subsequence with constant second differences.
0, 1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 21, 24, 26, 28, 29, 31, 33, 35, 38, 40, 41, 43, 49, 50, 52, 53, 58, 59, 62, 63, 64, 69, 70, 72, 73, 77, 81, 82
Offset: 1
Crossrefs
Cf. A267305 (positive variant: starting with 1).
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.
Programs
-
PARI
A267304(n, show=0, L=7, o=2, v=[0], D=v->v[2..-1]-v[1..-2])={ my(d, m); while( #v
1, ); #Set(d)>1||next(2), 2); break)); v[#v]} \\ M. F. Hasler, Jan 12 2016