A240557 Earliest positive increasing sequence with no 5-term subsequence of constant third differences.
1, 2, 3, 4, 6, 8, 12, 16, 17, 28, 48, 49, 65, 96, 176, 197, 212, 213, 215, 248, 250, 253, 399, 840, 1003, 1015, 1017, 1036, 1037, 1038, 1052, 1055, 1073, 1122, 1144, 1147, 1173, 1259, 4272, 4283, 4285, 4337, 4572, 4579, 4583, 4599, 4614, 4623, 4629, 4647
Offset: 1
Keywords
Crossrefs
Cf. A240556 (starting with 0).
Programs
-
Mathematica
t = {1, 2, 3, 4}; Do[s = Table[Append[i, n], {i, Subsets[t, {4}]}]; If[! MemberQ[Flatten[Table[Differences[i, 4], {i, s}]], 0], AppendTo[t, n]], {n, 5, 5000}]; t
-
PARI
A240557(n,show=0,L=5,o=3,v=[1],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
Extensions
Definition corrected by M. F. Hasler, Jan 12 2016
Comments