login
Earliest nonnegative increasing sequence having no 7-term subsequence with constant second differences.
4

%I #5 Jan 13 2016 00:10:00

%S 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,

%T 38,40,41,43,49,50,52,53,58,59,62,63,64,69,70,72,73,77,81,82

%N Earliest nonnegative increasing sequence having no 7-term subsequence with constant second differences.

%o (PARI) A267304(n, show=0, L=7, o=2, v=[0], 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

%Y Cf. A267305 (positive variant: starting with 1).

%Y No 3-term AP: A005836 (>=0), A003278 (>0);

%Y no 4-term AP: A240075 (>=0), A240555 (>0);

%Y no 5-term AP: A020654 (>=0), A020655 (>0);

%Y no 6-term AP: A020656 (>=0), A005838 (>0);

%Y no 7-term AP: A020657 (>=0), A020658 (>0);

%Y no 8-term AP: A020659 (>=0), A020660 (>0);

%Y no 9-term AP: A020661 (>=0), A020662 (>0);

%Y no 10-term AP: A020663 (>=0), A020664 (>0).

%Y Cf. A240075 and A240555 for sequences avoiding 4-term subsequences with constant second differences.

%Y Cf. A267300 and A267301 for sequences avoiding 5-term subsequences with constant second differences.

%Y Cf. A267302 and A267303 for sequences avoiding 6-term subsequences with constant second differences.

%Y Cf. A240556 and A240557 for sequences avoiding 5-term subsequences with constant third differences.

%K nonn,more

%O 1,3

%A _M. F. Hasler_, Jan 12 2016