A240555 Lexicographically earliest positive increasing sequence such that no four terms have constant second differences.
1, 2, 3, 5, 6, 9, 16, 17, 18, 21, 45, 52, 53, 54, 57, 59, 65, 79, 167, 168, 193, 196, 197, 201, 203, 204, 207, 218, 227, 249, 250, 277, 313, 650, 658, 679, 682, 683, 716, 727, 741, 744, 748, 751, 772, 791, 831, 834, 837, 839, 843, 855, 876, 909, 912, 972
Offset: 1
Keywords
Examples
After 1,2,3 the number 4 is excluded since (1,2,3,4) has zero second and third differences. After 1,2,3,5 the number 8 is excluded since (2,3,5,8) has second differences 1,1.
Links
- T. D. Noe, Table of n, a(n) for n = 1..755 (terms < 10^6)
Crossrefs
Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):
Cf. A240075 (nonnegative version, a(n)-1).
Programs
-
Mathematica
t = {1, 2, 3}; Do[s = Table[Append[i, n], {i, Subsets[t, {3}]}]; If[! MemberQ[Flatten[Table[Differences[i, 3], {i, s}]], 0], AppendTo[t, n]], {n, 4, 1000}]; t
-
PARI
A240555(n, show=0, L=4, o=2, 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 N. J. A. Sloane, Jan 04 2016 and M. F. Hasler at the suggestion of Lewis Chen
Comments