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.
%I A381597 #7 Mar 01 2025 22:48:58 %S A381597 1,1,1,2,1,1,2,1,2,2,2,1,1,2,1,1,3,2,3,2,1,3,1,2,3,2,2,1,3,3,2,1,2,3, %T A381597 3,3,1,1,4,1,2,3,4,3,1,3,1,4,4,2,3,2,2,4,3,4,2,4,4,2,1,4,1,3,2,2,4,5, %U A381597 3,1,3,3,1,4,4,2,4,4,3,1,1,2,3,3,2,5,5,3,5,2,1,3,4,5,4,1,5,4,3,1,2,4,1,4,1,5,2,2,3,3,5,5,5,4,5,1,4,3,2,5 %N A381597 Lexicographically earliest sequence of positive integers such that for any t and k, with k>=1, where t = a(n) = a(n+k) = a(n+2*k), only one occurrence of k, for a given t, appears anywhere in the sequence. %C A381597 See A381599 for the index where n first appears, and A381598 for the index where three consecutive n's appears. %H A381597 Scott R. Shannon, <a href="/A381597/b381597.txt">Table of n, a(n) for n = 1..10000</a> %e A381597 a(1) = a(2) = a(3) = 1, which is the first appearance of three 1's separated by one term. %e A381597 a(4) = 2 as 1 cannot be chosen as that would form a(2) = a(3) = a(4) = 1, but three 1's separated by one term has already appeared. %e A381597 a(5) = 1, which also forms three 1's separated by two terms, a(1) = a(3) = a(5) = 1. %e A381597 a(17) = 3 as 1 cannot be chosen as that would form a(15) = a(16) = a(17) = 1, but three 1's separated by one term has already appeared, while choosing 2 would form a(11) = a(14) = a(17) = 2, but three 2's separated by three terms has already appeared at a(4) = a(7) = a(10) = 2. %Y A381597 Cf. A381598 (triplets), A381599 (where n first appears), A370708 (indices where 1's appear), A281511, A229037. %K A381597 nonn %O A381597 1,4 %A A381597 _Scott R. Shannon_, Mar 01 2025