Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Jan 28 2023 23:36:19
%S 0,1,2,3,4,5,6,7,8,9,0,1,1,1,1,1,1,1,1,1,0,1,2,2,2,2,2,2,2,2,0,1,2,3,
%T 3,3,3,3,3,3,0,1,2,3,4,4,4,4,4,4,0,1,2,3,4,5,5,5,5,5,0,1,2,3,4,5,6,6,
%U 6,6,0,1,2,3,4,5,6,7,7,7,0,1,2,3,4,5,6,7,8,8,0,1,2,3,4,5,6,7,8,9,0,1,0,0,0
%N The mode of the digits of n (using smallest mode if multimodal).
%C a(101)=1 and A054054(101)=0, but all previous terms are equivalent.
%H Bence BernĂ¡th, <a href="/A115353/b115353.txt">Table of n, a(n) for n = 0..10000</a>
%e a(12)=1 because 1, 2, the digits of 12, each occur the same number of times and 1 is the smaller of the two modes.
%e a(101)=1 because 1 is the unique mode of 1, 0, 1 (occurring twice while 0 appears only once).
%t a[n_] := Min[Commonest[IntegerDigits[n]]]; Array[a,105,0] (* _Stefano Spezia_, Jan 08 2023 *)
%o (MATLAB)
%o function nth_term=A115353(n)
%o nth_term=mode((num2str(n)-'0'));
%o end
%o sequence = arrayfun(@A115353, linspace(0,105,106))
%o % _Bence BernĂ¡th_, Jan 06 2023
%o (Python)
%o from statistics import mode
%o def a(n): return int(mode(sorted(str(n))))
%o print([a(n) for n in range(105)]) # _Michael S. Branicky_, Jan 08 2023
%Y Cf. A054054 (Smallest digit of n).
%K base,nonn
%O 0,3
%A _Rick L. Shepherd_, Jan 21 2006