OFFSET
0,4
COMMENTS
Up to a(19)=10, the terms are identical to A248034. The branches (distinct lines of terms indicating the largest digit of the preceding term) can be labeled by the counter digit (shown in the scatter plot). From 9 to 1 the branches gradually get fragmented. Below digit 5 it is harder to disentangle the branches in some places. A repeating pattern also appears (shown in the inset of the scatter plot).
LINKS
Bence Bernáth, Table of n, a(n) for n = 0..10000
Eric Angelini, Digit-counters updating themselves
Bence Bernáth, Scatter plot for n=0..500000
Michael De Vlieger, Log log scatterplot of a(n) n = 1..10^6.
Michael De Vlieger, Log log scatterplot of a(n), n = 1..10^5, with a color function indicating largest digit of preceding term, where black = 0, red = 1, orange = 2, ..., magenta = 9.
MATHEMATICA
nn = 79; s[_] = 0; a[0] = 0; Do[(Set[d, Max[#]]; Map[s[#1] += #2 & @@ # &, Tally[#] ]) &@ IntegerDigits[a[n - 1]]; a[n] = s[d], {n, nn}]; Array[a, nn + 1, 0] (* Michael De Vlieger, Dec 28 2022 *)
PROG
(MATLAB)
length_seq=150;
sequence(1)=0;
seq_for_digits=(num2str(sequence(1))-'0');
for i1=1:1:length_seq
sequence(i1+1)=sum(seq_for_digits==max((num2str(sequence(i1))-'0'))');
seq_for_digits=[seq_for_digits, num2str(sequence(i1+1))-'0'];
end
(Python)
sequence=[0]
length=150
seq_for_digits=list(map(int, list(str(sequence[0]))))
for ii in range(length):
sequence.append(seq_for_digits.count(max(list(map(int, list(str(sequence[-1])))))))
seq_for_digits.extend(list(map(int, list(str(sequence[-1])))))
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
Bence Bernáth, Dec 08 2022
STATUS
approved