# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a261161 Showing 1-1 of 1 %I A261161 #18 Jan 02 2023 12:30:51 %S A261161 2,0,1,10,12,3,4,5,6,7,8,9,20,13,22,23,24,25,26,21,27,31,28,29,14,30, %T A261161 32,15,33,34,41,35,36,37,51,38,39,40,42,16,43,44,45,46,17,47,48,49,50, %U A261161 52,53,54,55,56,61,57,58,59,60,62,63,71,64,65,66,67,68,69,70 %N A261161 List run lengths of digits different from '1'. Lexicographically first such sequence of nonnegative numbers with no repeated terms. %C A261161 In the concatenation of all terms of this sequence, "201101234567892013...", consider the digits '1' as delimiters of chunks of other digits, "20", "", "0", "2345678920", .... The lengths of these chunks are given by the terms of the sequence. %H A261161 E. Angelini, To reach the next "1", SeqFan list, August 10, 2015. %e A261161 The sequence cannot start with a(1) = 0, which would imply starting with a chunk of 0 digits different from '1', i.e., a digit '1': contradiction. It also cannot start with a(1) = 1, which would require starting with a string of 1 digit different from '1': contradiction. So it has to start with a(1) = 2 digits different from '1'. %e A261161 The smallest possible choice for the next term is a(2) = 0. %e A261161 Then, the first '1' must occur as a(3) = 1, and be immediately followed by another digit '1', whence a(4) = 10, in order to have a(2) = 0 digits different from 1 in between them. %e A261161 Then, there is a(3) = 1 digit different from '1' until the next '1', occurring in a(5) = 12. %o A261161 (PARI) A261161(n=99,d=1,a=2,p=0,u=[-1],r=u)={for(n=1,n, print1(a","); p+=#digits(a)+!a; r=concat(r,r[#r]+a+1); while(#r>1&&r[1]

1&&u[2]==u[1]+1,u=u[2..-1]); for(k=u[1]+1,9e9,setsearch(u,k)&&next; if( r[1] >= p+#dk=if(k,digits(k),[0]), setsearch(Set(dk),d)&&next, for(i=1,#dk,(dk[i]==d)==!setsearch(r,p+i-1)&&next(2))); a=k;next(2));error);a} %Y A261161 Cf. A261160 - A261169 for the variants that use digit '0', ..., '9' as delimiter. %K A261161 nonn,base %O A261161 1,1 %A A261161 _Eric Angelini_ and _M. F. Hasler_, Aug 10 2015 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE