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!)
A297418 a(n) is the smallest positive number not yet in the sequence that contains the largest digit in a(n-1); a(1)=0. 3
0, 10, 1, 11, 12, 2, 20, 21, 22, 23, 3, 13, 30, 31, 32, 33, 34, 4, 14, 24, 40, 41, 42, 43, 44, 45, 5, 15, 25, 35, 50, 51, 52, 53, 54, 55, 56, 6, 16, 26, 36, 46, 60, 61, 62, 63, 64, 65, 66, 67, 7, 17, 27, 37, 47, 57, 70, 71, 72, 73, 74, 75, 76, 77, 78, 8, 18, 28, 38, 48, 58, 68, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 19, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Once the digit 9 is introduced in a(82)=89, all following terms must contain a 9.
The sequence contains no fixed points.
Analog sequence formed by taking the smallest digit from a(n-1) is A011540.
LINKS
FORMULA
For n >= 91, a(n) = A011539(n - 81). - Iain Fox, Dec 31 2017
MATHEMATICA
a[n_] := a[n] = Block[{k = 1, s = Union[ IntegerDigits[ a[n -1]]][[-1]], t = Array[a, n - 1]}, While[ MemberQ[t, k] || !MemberQ[ IntegerDigits@ k, s], k++]; k]; a[1] = 0; Array[a, 72] (* Robert G. Wilson v, Dec 30 2017 *)
Nest[Append[#, Block[{m = Max@ IntegerDigits@ Last@ #, k}, k = m; While[Nand[FreeQ[#, k], MemberQ[IntegerDigits[k], m]], k++]; k]] &, {0}, 84] (* Michael De Vlieger, Dec 30 2017 *)
PROG
(PARI) first(n) = my(res = vector(n)); for(x=2, n, if(x == 2, res[x] = 10, for(i=1, +oo, if(!setsearch(Set(res), i) && setsearch(Set(digits(i)), vecmax(digits(res[x-1]))), res[x] = i; break())))); res \\ Iain Fox, Dec 31 2017
CROSSREFS
Sequence in context: A129888 A239113 A107353 * A297352 A370401 A172171
KEYWORD
nonn,base
AUTHOR
Enrique Navarrete, Dec 29 2017
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 May 7 09:38 EDT 2024. Contains 372302 sequences. (Running on oeis4.)