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.
%I A109167 #14 Aug 25 2025 17:01:32 %S A109167 1,2,1,0,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,9,9,9,9,9,10,10,10, %T A109167 10,10,11,11,11,11,11,12,12,12,12,12,12,13,13,13,13,13,13,14,14,14,14, %U A109167 14,14,15,15,15,15,15,15,16,16,16,16,16,16,16,17,17,17,17,17,17,17,18 %N A109167 a(n) = least nonnegative integer such that n appears a(n) times. %C A109167 The concatenation of the first four terms' (decimal) digits gives 1210 = A046043(1). %H A109167 Michael S. Branicky, <a href="/A109167/b109167.txt">Table of n, a(n) for n = 0..10000</a> %e A109167 Note that we do not need to specify a(0) explicitly. Indeed, a(0) = 1 as it cannot be 0. a(1) = 2 as it cannot be 0 or 1. %o A109167 (Python) %o A109167 from itertools import count, islice %o A109167 def agen(): # generator of terms %o A109167 alst = [1, 2, 1, 0, 4, 4, 4, 4] %o A109167 yield from alst %o A109167 for n in count(5): %o A109167 add = [n]*alst[n] %o A109167 yield from add %o A109167 alst.extend(add) %o A109167 print(list(islice(agen(), 79))) # _Michael S. Branicky_, Aug 25 2025 %Y A109167 Cf. A046043 (Autobiographical numbers), A001462 (Golomb's sequence). %K A109167 nonn,changed %O A109167 0,2 %A A109167 _Rick L. Shepherd_, Jun 20 2005