cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A240556 Earliest nonnegative increasing sequence with no 5-term subsequence of constant third differences.

This page as a plain text file.
%I A240556 #23 Feb 27 2018 16:29:07
%S A240556 0,1,2,3,5,7,11,15,16,27,47,48,64,95,175,196,211,212,214,247,249,252,
%T A240556 398,839,1002,1014,1016,1035,1036,1037,1051,1054,1072,1121,1143,1146,
%U A240556 1172,1258,4271,4282,4284,4336,4571,4578,4582,4598,4613,4622,4628,4646
%N A240556 Earliest nonnegative increasing sequence with no 5-term subsequence of constant third differences.
%C A240556 For the positive sequence, see A240557, which is this sequence plus 1. Is there a simple way of determining this sequence, as in the case of the no 3-term arithmetic progression?
%e A240556 After (0, 1, 2, 3, 5, 7), the number 10 is excluded since else the subsequence (0, 2, 3, 5, 10) would have successive 1st, 2nd and 3rd differences (2, 1, 2, 5), (-1, 1, 3) and (2, 2), which is constant and thus excluded.
%t A240556 t = {0, 1, 2, 3}; Do[s = Table[Append[i, n], {i, Subsets[t, {4}]}]; If[! MemberQ[Flatten[Table[Differences[i, 4], {i, s}]], 0], AppendTo[t, n]], {n, 4, 5000}]; t
%o A240556 (PARI) A240556(n,show=0,L=5,o=3,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 A240556 Cf. A240557 (starting with 1).
%Y A240556 No 3-term AP: A005836 (>=0), A003278 (>0);
%Y A240556 no 4-term AP: A240075 (>=0), A240555 (>0);
%Y A240556 no 5-term AP: A020654 (>=0), A020655 (>0);
%Y A240556 no 6-term AP: A020656 (>=0), A005838 (>0);
%Y A240556 no 7-term AP: A020657 (>=0), A020658 (>0);
%Y A240556 no 8-term AP: A020659 (>=0), A020660 (>0);
%Y A240556 no 9-term AP: A020661 (>=0), A020662 (>0);
%Y A240556 no 10-term AP: A020663 (>=0), A020664 (>0).
%Y A240556 Cf. A240075 and A240555 for sequences avoiding 4-term subsequences with constant second differences.
%K A240556 nonn
%O A240556 1,3
%A A240556 _T. D. Noe_, Apr 09 2014