login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261163 List run lengths of digits different from '3'. Lexicographically first such sequence of nonnegative numbers with no repeated terms. 8
1, 3, 0, 2, 4, 33, 5, 6, 30, 7, 8, 9, 31, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 32, 28, 29, 34, 40, 41, 13, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 35, 59, 60, 61, 36, 62, 64, 65, 23, 66, 67, 68, 69, 43, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 53 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
In the concatenation of all terms of this sequence, "13024335630...", consider the digits '3' as delimiters of chunks of other digits, "1", "024", "", "56", .... The lengths of these chunks are given by the terms of the sequence. At any point, the next term is the smallest number not occurring earlier and not leading to a contradiction.
LINKS
Eric Angelini, To reach the next "1", SeqFan list, August 10, 2015.
EXAMPLE
The sequence starts with a(1) = 1 digits different from '3'. (It is not possible to start with a 0 because this would require to start with a chunk of 0 digits different from '3', i.e., with a digit 3, contradiction.)
Then, after the initial a(1) = 1, must follow a digit '3', viz., a(2) = 3.
This implies that the next 3 digits must be different from '3': a(3) = 0, a(4) = 2 and a(5) = 4 are the smallest possible choices.
Then must follow a chunk of a(3) = 0 digits different from '3', otherwise said, two consecutive digits 3, whence a(6) = 33.
Then follow a(4) = 2 other digits, a(7) = 5 and a(8) = 6, before the next '3' in a(9) = 30, etc.
PROG
(PARI) A261163(n=99, d=3, 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
Sequence in context: A139585 A273084 A349728 * A292244 A208329 A283025
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Aug 10 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)