A362816 Lexicographically earliest sequence such that nowhere is a term a(n) contained in an arithmetic progression of length greater than a(n).
2, 2, 3, 2, 2, 3, 3, 3, 5, 2, 2, 3, 2, 2, 3, 3, 3, 5, 3, 5, 5, 5, 3, 3, 3, 5, 5, 2, 2, 3, 2, 2, 5, 5, 3, 3, 2, 2, 3, 2, 2, 5, 3, 3, 5, 3, 5, 5, 3, 3, 5, 5, 3, 5, 5, 5, 6, 5, 3, 5, 5, 6, 5, 3, 3, 3, 5, 3, 5, 5, 5, 3, 3, 3, 5, 5, 5, 6, 5, 5, 3, 2, 2, 5, 2, 2, 6
Offset: 1
Keywords
Examples
For n=9 first we check 1 (never in the sequence). If a(9) were 2, {a(1),a(5),a(9)} = {2,2,2} would form an arithmetic progression of length 3 with a minimum value of 2; this is not allowed. Next, if a(9) were 3, {a(6),a(7),a(8),a(9)} = {3,3,3,3} would form an arithmetic progression of length 4 with a minimum value of 3; this is not allowed. Next, if a(9) were 4, {a(5),a(7),a(9)} = {2,3,4} would form an arithmetic progression of length 3 with a minimum value of 2; this is not allowed. Last, a(9) = 5 fits the definition, as no arithmetic progressions p can be made such that length(p) > min (p) and 5 is the least positive integer where this is satisfied, so a(9) = 5.
Links
- Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
- Samuel Harkness, MATLAB program
Programs
-
MATLAB
See Links section.
Comments