Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Mar 08 2015 20:42:35
%S 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,
%T 101,20,22,24,26,28,102,30,31,34,37,103,40,41,35,38,110,32,45,39,112,
%U 42,36,49,113,50,51,46,104,52,47,111,33,56,114,60,61,57,120,43,67,123,62
%N 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.
%C The "seed" is 0 in this case.
%C This is a permutation of the nonnegative integers. - Nadia Heninger, Aug 10 2005
%H R. J. Mathar, Feb 21 2008, <a href="/A107408/b107408.txt">Table of n, a(n) for n = 0..93</a>
%H N. Heninger, E. M. Rains and N. J. A. Sloane, <a href="http://arXiv.org/abs/math.NT/0509316">On the Integrality of n-th Roots of Generating Functions</a>, J. Combinatorial Theory, Series A, 113 (2006), 1732-1745.
%e 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).
%p 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
%K base,easy,nonn
%O 0,2
%A _Eric Angelini_, Jun 09 2005
%E Corrected and extended by _R. J. Mathar_, Feb 21 2008