OFFSET
0,4
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..9999
Michael De Vlieger, Table of n, a(n) for n = 0..10^5
Michael De Vlieger, Scalar scatterplot of a(n), n = 0..2^16, with points assigned a color function as to digit d that is a(n-1) digits back. Black indicates d=0, red d=1, ..., magenta d=9.
Michael De Vlieger, Log-log scatterplot of a(n), n = 0..2^20, with points assigned a color function as to digit d that is a(n-1) digits back. Black indicates d=0, red d=1, ..., magenta d=9.
Scott R. Shannon, Image of the first 5000000 terms.
EXAMPLE
a(7) = 3 as a(6) = 3 and the string concatenation of a(0)..a(6) = "0112223", and the digit 3 digits back from the end of the string concatenation is 2, and 2 has appeared three times in the string.
PROG
(MATLAB)
function a = A357930( max_n )
a = 0; s = '0'; c = zeros(1, 10); c(1) = 1;
for n = 2:max_n
k = c(s(end-a(n-1))-47); sk = num2str(k);
c(sk-47) = c(sk-47)+1; s = [s sk]; a(n) = k;
end
end % Thomas Scheuerle, Oct 21 2022
CROSSREFS
KEYWORD
AUTHOR
Scott R. Shannon, Oct 21 2022
STATUS
approved