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”).

A115353
The mode of the digits of n (using smallest mode if multimodal).
5
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, 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, 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
OFFSET
0,3
COMMENTS
a(101)=1 and A054054(101)=0, but all previous terms are equivalent.
LINKS
EXAMPLE
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.
a(101)=1 because 1 is the unique mode of 1, 0, 1 (occurring twice while 0 appears only once).
MATHEMATICA
a[n_] := Min[Commonest[IntegerDigits[n]]]; Array[a, 105, 0] (* Stefano Spezia, Jan 08 2023 *)
PROG
(MATLAB)
function nth_term=A115353(n)
nth_term=mode((num2str(n)-'0'));
end
sequence = arrayfun(@A115353, linspace(0, 105, 106))
% Bence Bernáth, Jan 06 2023
(Python)
from statistics import mode
def a(n): return int(mode(sorted(str(n))))
print([a(n) for n in range(105)]) # Michael S. Branicky, Jan 08 2023
CROSSREFS
Cf. A054054 (Smallest digit of n).
Sequence in context: A085124 A252648 A054054 * A031298 A004428 A004429
KEYWORD
base,nonn
AUTHOR
Rick L. Shepherd, Jan 21 2006
STATUS
approved