cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A329447 Start with a(0)=0; thereafter, look left and identify the least frequent digit d so far (in case of a tie, choose the smallest d): after then a(n) = 10c + d, where c > 0 is the number of times d has appeared so far.

This page as a plain text file.
%I A329447 #41 Nov 19 2024 12:59:26
%S A329447 0,10,11,20,12,22,30,13,23,33,40,14,24,34,44,50,15,25,35,45,55,60,16,
%T A329447 26,36,46,56,66,70,17,27,37,47,57,67,77,80,18,28,38,48,58,68,78,88,90,
%U A329447 19,29,39,49,59,69,79,89,99,100,112,113,114,115,116,117,118,119,120,123,124,125,126,127,128,129
%N A329447 Start with a(0)=0; thereafter, look left and identify the least frequent digit d so far (in case of a tie, choose the smallest d): after then a(n) = 10c + d, where c > 0 is the number of times d has appeared so far.
%C A329447 The term "10c + d" are to be read "c digits d have appeared so far", as in the "look and see" sequences llike A045918.
%C A329447 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
%C A329447 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.
%H A329447 M. F. Hasler, <a href="/A329447/b329447.txt">Table of n, a(n) for n = 0..10000</a> (independently computed by _Jean-Marc Falcoz_).
%H A329447 Eric Angelini, <a href="http://cinquantesignes.blogspot.com/2019/11/look-left-and-say.html">Look left and say</a>, Cinquante signes Blog Post, Nov 14 2019.
%H A329447 Eric Angelini, <a href="/A329447/a329447.pdf">Look left and say</a>, Cinquante signes Blog Post, Nov 14 2019. [Local copy, with permission]
%p A329447 a[0]:= 0;
%p A329447 S[0]:= 1:
%p A329447 for i from 1 to 9 do S[i]:= 0 od:
%p A329447 for n from 1 to 100 do
%p A329447   a[n]:= min(select(`>=`,[seq(10*S[i]+i, i=0..9)],10));
%p A329447   L:= convert(a[n],base,10);
%p A329447   for d from 0 to 9 do S[d]:= S[d] + numboccur(d,L) od;
%p A329447 od:
%p A329447 seq(a[n],n=0..100); # _Robert Israel_, Nov 14 2019
%o A329447 (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)
%o A329447 (Python)
%o A329447 from itertools import islice
%o A329447 def agen():  # generator of terms
%o A329447     counts = [1] + [0 for i in range(1, 10)]
%o A329447     yield 0
%o A329447     while True:
%o A329447         m = float('inf')
%o A329447         for i in range(10):
%o A329447             if counts[i] and counts[i] < m:
%o A329447                 m, argm = counts[i], i
%o A329447         an = 10*m + argm
%o A329447         yield an
%o A329447         for d in str(an): counts[int(d)] += 1
%o A329447 print(list(islice(agen(), 72))) # _Michael S. Branicky_, Nov 11 2024
%Y A329447 Cf. A045918 (describe n), A005150 (the classic "Say What You See"), A139282 (count vowels so far), A139097 (count letters so far).
%Y A329447 A376779 gives terms in increasing order. See also A377905.
%K A329447 nonn,base
%O A329447 0,2
%A A329447 _Eric Angelini_ and _M. F. Hasler_, Nov 14 2019
%E A329447 Edited by _N. J. A. Sloane_, Nov 10 2024