login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(0) = 0; for n > 0, a(n) is the number of terms prior to the term a(n-1-a(n-1)) that equal a(n-1-a(n-1)).
2

%I #14 Oct 15 2023 09:26:23

%S 0,0,1,1,0,2,1,0,3,0,4,2,4,0,5,4,1,2,2,3,3,2,1,4,1,3,4,4,3,3,4,4,5,5,

%T 4,6,5,7,6,1,1,6,0,6,0,7,1,1,8,7,6,7,7,1,4,4,3,10,9,2,0,8,10,4,5,5,8,

%U 0,9,5,4,2,6,2,6,1,6,12,5,7,5,11,12,12,6,7,7,5,1,9,8,1,3,2,13,0

%N a(0) = 0; for n > 0, a(n) is the number of terms prior to the term a(n-1-a(n-1)) that equal a(n-1-a(n-1)).

%C In the first 10 million terms the value 4 appears the most often, 11838 times, although the count of neighboring values is less than 2% different. It is unknown if this stays the most common term as n increases. In the same range on thirty-eight occasions there are three consecutive equal terms, the first time being a(105) = a(106) = a(107) = 8. It is unknown if four or more consecutive terms eventually appear.

%H Scott R. Shannon, <a href="/A366548/b366548.txt">Table of n, a(n) for n = 0..10000</a>

%H Scott R. Shannon, <a href="/A366548/a366548.png">Image of the first 10 million terms</a>.

%e a(2) = 1 as a(2-1-a(2-1)) = a(1-0) = a(1) = 0, and there is one term prior to a(1) that equals 0, namely a(0).

%e a(6) = 1 as a(6-1-a(6-1)) = a(5-2) = a(3) = 1, and there is one term prior to a(3) that equals 1, namely a(2).

%Y Cf. A366549, A363193, A354971, A181391, A342585.

%K nonn,look

%O 0,6

%A _Scott R. Shannon_, Oct 13 2023