OFFSET
0,2
COMMENTS
The term "10c + d" are to be read "c digits d have appeared so far", as in the "look and see" sequences llike A045918.
It follows immediately from the definition that all terms are distinct. For a sorted list of the terms, see A376779. For a tabular method of computing a(n), see the triangle in A377905. - N. J. A. Sloane, Nov 11 2024
An analogous sequence may be obtained for any initial term a(0). Sequence A329448 lists the starting values that will appear a second time later in the respective sequence.
LINKS
M. F. Hasler, Table of n, a(n) for n = 0..10000 (independently computed by Jean-Marc Falcoz).
Eric Angelini, Look left and say, Cinquante signes Blog Post, Nov 14 2019.
Eric Angelini, Look left and say, Cinquante signes Blog Post, Nov 14 2019. [Local copy, with permission]
MAPLE
a[0]:= 0;
S[0]:= 1:
for i from 1 to 9 do S[i]:= 0 od:
for n from 1 to 100 do
a[n]:= min(select(`>=`, [seq(10*S[i]+i, i=0..9)], 10));
L:= convert(a[n], base, 10);
for d from 0 to 9 do S[d]:= S[d] + numboccur(d, L) od;
od:
seq(a[n], n=0..100); # Robert Israel, Nov 14 2019
PROG
(PARI) A329447_vec(N)={my(c=Vec(1, 10), t); vector(N, i, for(j=1, #i=vecsort(c, , 1), if(c[i[j]], i=i[j]; break)); for(j=1, #i=digits(t=c[i]*10+i-1), c[i[j]+1]++); t)} \\ Returns the vector a(1..N)
(Python)
from itertools import islice
def agen(): # generator of terms
counts = [1] + [0 for i in range(1, 10)]
yield 0
while True:
m = float('inf')
for i in range(10):
if counts[i] and counts[i] < m:
m, argm = counts[i], i
an = 10*m + argm
yield an
for d in str(an): counts[int(d)] += 1
print(list(islice(agen(), 72))) # Michael S. Branicky, Nov 11 2024
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
Eric Angelini and M. F. Hasler, Nov 14 2019
EXTENSIONS
Edited by N. J. A. Sloane, Nov 10 2024
STATUS
approved