

A107408


Form the sum of the digits of a(n); a(n+1) is the smallest unused integer having a copy of every digit of this sum.


1



0, 10, 1, 11, 2, 12, 3, 13, 4, 14, 5, 15, 6, 16, 7, 17, 8, 18, 9, 19, 100, 21, 23, 25, 27, 29, 101, 20, 22, 24, 26, 28, 102, 30, 31, 34, 37, 103, 40, 41, 35, 38, 110, 32, 45, 39, 112, 42, 36, 49, 113, 50, 51, 46, 104, 52, 47, 111, 33, 56, 114, 60, 61, 57, 120, 43, 67, 123, 62
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

The "seed" is 0 in this case.
This is a permutation of the nonnegative integers.  Nadia Heninger, Aug 10 2005


LINKS

R. J. Mathar, Feb 21 2008, Table of n, a(n) for n = 0..93
N. Heninger, E. M. Rains and N. J. A. Sloane, On the Integrality of nth Roots of Generating Functions, J. Combinatorial Theory, Series A, 113 (2006), 17321745.


EXAMPLE

Sum of the digits of 29 is 11; the smallest available integer which has a copy of every digit of 11 is 101 (not 31).


MAPLE

A007953 := proc(n) add(i, i=convert(n, base, 10)) ; end: multDigs := proc(n) local a, dgs, i; if n = 0 then a := [1, seq(0, i=1..9)] ; else a := [seq(0, i=0..9)] ; dgs := convert(n, base, 10) ; for i in dgs do a := subsop(i+1=op(i+1, a)+1, a) ; od: fi ; RETURN(a) ; end: A107408 := proc(nmax) local a, ds, dsk, k, works, d ; a := [0] ; while nops(a) < nmax do ds := multDigs(A007953(op(1, a))) ; for k from 1 do if not k in a then dsk := multDigs(k) ; works := true; for d from 1 to 10 do if op(d, dsk) < op(d, ds) then works := false ; break ; fi ; od: if works then a := [op(a), k] ; break ; fi ; fi ; od: od: RETURN(a) ; end: A107408(120) ; # R. J. Mathar, Feb 21 2008


CROSSREFS

Sequence in context: A238880 A130858 A098760 * A129888 A239113 A107353
Adjacent sequences: A107405 A107406 A107407 * A107409 A107410 A107411


KEYWORD

base,easy,nonn


AUTHOR

Eric Angelini, Jun 09 2005


EXTENSIONS

Corrected and extended by R. J. Mathar, Feb 21 2008


STATUS

approved



