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”).
%I #20 Jan 06 2023 15:18:05
%S 0,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,2,2,3,2,4,2,5,2,6,2,7,2,8,2,
%T 9,2,10,3,3,4,3,5,3,6,3,7,3,8,3,9,3,10,4,4,5,4,6,4,7,4,8,4,9,4,10,5,5,
%U 6,5,7,5,8,5,9,5,10,6,6,7,6,8,6,9,6,10,7,7,8,7,9,7,10
%N a(n+1) gives the number of occurrences of the mode of the digits of a(n) among all the digits of [a(0), a(1), ..., a(n)], with a(0)=0.
%C The mode is the most frequently occurring value among the digits of a(n). When there are multiple values occurring equally frequently, the mode is the smallest of those values.
%C Up to a(464)=110, the terms are identical to A358967.
%H Bence Bernáth, <a href="/A359031/b359031.txt">Table of n, a(n) for n = 0..20000</a>
%H Eric Angelini, <a href="http://list.seqfan.eu/pipermail/seqfan/2014-October/013784.html">Digit-counters updating themselves</a>
%o (MATLAB)
%o length_seq=470;
%o sequence(1)=0;
%o seq_for_digits=(num2str(sequence(1))-'0');
%o for i1=1:1:length_seq
%o sequence(i1+1)=sum(seq_for_digits==mode((num2str(sequence(i1))-'0'))');
%o seq_for_digits=[seq_for_digits, num2str(sequence(i1+1))-'0'];
%o end
%o (Python)
%o import statistics as stat
%o sequence=[0]
%o length=470
%o seq_for_digits=list(map(int, list(str(sequence[0]))))
%o for ii in range(length):
%o sequence.append(seq_for_digits.count(stat.mode(list(map(int, list(str(sequence[-1])))))))
%o seq_for_digits.extend(list(map(int, list(str(sequence[-1])))))
%Y Cf. A248034, A249009, A356348, A336514, A358967, A358851, A322182.
%K nonn,base,look
%O 0,4
%A _Bence Bernáth_, Dec 12 2022