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 A367026 #24 Nov 05 2023 10:36:25 %S A367026 0,1,2,2,4,4,4,4,7,7,7,7,7,7,8,8,13,13,13,13,13,13,13,13,13,13,14,14, %T A367026 15,15,22,22,22,22,22,22,22,22,22,22,22,22,22,22,25,25,25,25,25,25,26, %U A367026 26,27,27,28,28,29,29,40,40,40,40,40,40,40,40,40,40,40,40 %N A367026 a(1) = 0, a(2) = 1; thereafter a(n) is the smallest index < n not equal to i +- a(i) for any i = 1..n-1. %C A367026 The sequence is nondecreasing. %H A367026 Neal Gersh Tolunsky, <a href="/A367026/b367026.txt">Table of n, a(n) for n = 1..10000</a> %H A367026 Neal Gersh Tolunsky, <a href="/A367026/a367026.png">Graph of first 16674 run lengths</a> %e A367026 a(3)=2 because a(2)=1 has i - a(i) = 2-1 = 1, which means that 1 cannot be a term (since it can be expressed as i - a(i) for some index i in the sequence thus far). 2 cannot be reached in this way, so a(3)=2. %e A367026 a(5)=4 because 1 = 2 - a(2) (as seen above); 2 = 4 - a(4); and 3 = 2 + a(2). 4 cannot be the answer to any such expression, so a(5)=4. %e A367026 Another way to see this is to consider each index i as a location from which one can jump forward or back a(i) terms. To find a(5), we see that there is no way to reach i=4, which is the smallest-indexed location with this property. %e A367026 0, 1, 2, 2 %e A367026 0<-1 %e A367026 0, 1, 2, 2 %e A367026 1<----2 %e A367026 0, 1, 2, 2 %e A367026 1->2 %e A367026 0, 1, 2, 2 %e A367026 ? %Y A367026 Cf. A367039, A359807, A362248. %K A367026 nonn %O A367026 1,3 %A A367026 _Neal Gersh Tolunsky_, Nov 01 2023