login
A261167
List run lengths of digits different from '7', when all terms are concatenated. Lexicographically first such sequence of nonnegative numbers with no repeated terms.
3
1, 7, 0, 2, 3, 4, 5, 6, 8, 77, 9, 17, 10, 27, 11, 12, 70, 13, 14, 71, 15, 16, 37, 18, 19, 20, 21, 72, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 58, 59, 60, 61, 62, 63, 73, 64, 65, 66, 68, 74, 69
OFFSET
1,2
COMMENTS
See A261161-A261163 for comments and examples.
LINKS
E. Angelini, To reach the next "1", SeqFan list, August 10, 2015.
PROG
(PARI) A261167(n=99, d=7, a=1, p=0, u=[-1], r=u)={for(n=2, n, print1(a", "); p+=#digits(a)+!a; r=concat(r, r[#r]+a+1); while(#r>1&&r[1]<p, r=r[2..-1]); u=setunion(u, [a]); while(#u>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}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Aug 10 2015
STATUS
approved