%I #23 Jun 23 2024 22:05:43
%S 1,1,2,1,1,2,2,4,4,1,1,2,1,1,2,2,4,4,2,4,4,5,5,8,5,5,9,9,4,2,5,11,2,2,
%T 4,1,1,5,1,1,10,2,2,4,1,1,4,4,10,10,4,8,10,10,2,4,1,2,5,4,10,10,4,2,8,
%U 8,5,8,5,13,13,17,5,13,2,11,17,10,10,13,13
%N Lexicographically earliest sequence of positive integers such that no three terms a(j), a(j+k), a(j+2k) (for any j and k) form an arithmetic progression in any order.
%C First differs from A229037 and A309890 at a(28).
%C This sequence avoids all six of the six permutations of a set of three integers in arithmetic progression. For example, the set {1,2,3} can be ordered as tuples (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2), and (3, 2, 1).
%C This sequence is part of a family of variants avoiding different permutations of arithmetic progressions at indices in arithmetic progression:
%C - A100480 (offset 1), A006997 (offset 0): Prohibits 1,1,1 and progressions of common difference 0.
%C - A309890: Prohibits 1,2,3 or progressions of the form c, c+d, c+2d, for all d >= 0.
%C - A373111: Prohibits 1,3,2 or progressions of the form c, c+2d, c+d, for all d >= 0.
%C - A371457: Prohibits 2,1,3 or progressions of the form c, c-d, c+d, for all d >= 0.
%C - A371632: Prohibits 2,3,1 or progressions of the form c, c+d, c-d, for all d >= 0.
%C - A373010: Prohibits 3,1,2 or progressions of the form c, c-2d, c-d, for all d>=0.
%C - A373052: Prohibits 3,2,1 or progressions of the form c, c-d, c-2d, for all d>=0.
%C With the sequences prohibiting the six permutations above, there are a total of 64 sequences which prohibit some combination of these six permutations of an arithmetic progression. At least two more of these are in the OEIS:
%C - A229037 ("forest fire sequence"): Prohibits (progressions of the same general form as) 1,2,3 and 3,2,1 .
%C - A361933 (the present sequence): Prohibits all six permutations.
%H Rémy Sigrist, <a href="/A361933/b361933.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A361933/a361933.gp.txt">PARI program</a>
%H <a href="/index/No#non_averaging">Index entries for non-averaging sequences</a>
%H Neal Gersh Tolunsky, <a href="/A361933/a361933.png">Graph of the first 200000 terms</a>
%F a(n) <= (n+1)/2.
%e a(28) cannot be 1 because then a(26)=5, a(27)=9, and a(28)=1 could be rearranged to form an arithmetic progression (1, 5, 9). The numbers 2-8 could also create an arithmetic progression so a(28)=9.
%o (PARI) \\ See Links section.
%Y Cf. A229037, A309890.
%K nonn
%O 1,3
%A _Neal Gersh Tolunsky_, Mar 30 2023