OFFSET

0,4

COMMENTS

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.

Up to a(464)=110, the terms are identical to A358967.

LINKS

Bence Bernáth, Table of n, a(n) for n = 0..20000

Eric Angelini, Digit-counters updating themselves

PROG

(MATLAB)

length_seq=470;

sequence(1)=0;

seq_for_digits=(num2str(sequence(1))-'0');

for i1=1:1:length_seq

sequence(i1+1)=sum(seq_for_digits==mode((num2str(sequence(i1))-'0'))');

seq_for_digits=[seq_for_digits, num2str(sequence(i1+1))-'0'];

end

(Python)

import statistics as stat

sequence=[0]

length=470

seq_for_digits=list(map(int, list(str(sequence[0]))))

for ii in range(length):

sequence.append(seq_for_digits.count(stat.mode(list(map(int, list(str(sequence[-1])))))))

seq_for_digits.extend(list(map(int, list(str(sequence[-1])))))

CROSSREFS

KEYWORD

AUTHOR

Bence Bernáth, Dec 12 2022

STATUS

approved