OFFSET
0,3
COMMENTS
In the first 100 million terms the longest run of consecutive equal terms is eight : a(69)..a(76) = 12. There is no other run of equal length in this range, and it is unknown if a longer run exists.
Other than the initial three terms, the first time a term exists that is one more than the previous term is a(29) = 8, a(30) = 9. Remarkably the first time two such consecutive terms exists is not until a(60917874) = 5394, a(60917875) = 5395, a(60917876) = 5396. It is unknown if three or more such terms exist.
Note that if the sequence starts with just a(0) = 0, a(1) = 1 then the resulting sequence is A003056.
The sequence is conjectured to contain all positive numbers. See A357944 for the index of where a given number first appears.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 0..10000
Scott R. Shannon, Image of the first 10000000 terms.
Scott R. Shannon, Frequency distribution of the first 10000000 terms. The maximum x value is 4858, which is the number of times 20 has appeared.
EXAMPLE
a(5) = 3 as the term at a(4 - a(4)) = a(4 - 1) = a(3) = 1, and 1 has appeared three times in the sequence.
MATHEMATICA
nn = 83; c[_] = 0; Array[Set[{a[#], c[#]}, {#, 1}] &, 3, 0]; Do[(a[n] = c[#]; c[c[#]]++) &[a[n - a[n - 1] - 1]], {n, 3, nn}]; Array[a, nn, 0] (* Michael De Vlieger, Oct 23 2022 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Scott R. Shannon, Oct 22 2022
STATUS
approved