[seqfan] Re: Starting and Ending Digits

Eric Angelini Eric.Angelini at kntv.be
Thu Jan 29 13:30:11 CET 2009


Hello Farideh,
congratulations for your computation -- could you please compute
a few more terms for me, if you have time:

S = 2,12,21,102,120,201,210,1002,1020,1200,2001,2010,2100,...

Definition : "a(n+1) is the smallest term containing all digits of a(n)"

Starting the seq with 1 gives A011557
http://www.research.att.com/~njas/sequences/A011557

Best,
É.

---

  Some of the 161 first terms which were written aren't correct.
  The Mathematica coding for this sequence is:

   a[1]=1;a[n_]:=a[n]=(b=Table[a[k],{k,n-1}];
   For[m=1,MemberQ[b,m]||MemberQ[IntegerDigits[m],Mod[a[n-1],10]],m++];m);
   Table[a[t],{t,161}]

  So the first 161 terms of the sequence are:

    1,10,20,30,40,50,60,70,80,90,100,101,11,12,2,
    21,13,3,23,31,14,4,24,34,41,15,5,25,35,45,51,
    16,6,26,36,46,56,61,17,7,27,37,47,57,67,71,18,
    8,28,38,48,58,68,78,81,19,9,29,39,49,59,69,79,
    89,91,102,22,32,42,52,62,72,82,92,112,120,103,
    33,43,53,63,73,83,93,113,123,130,104,44,54,64,
    74,84,94,114,124,134,140,105,55,65,75,85,95,
    115,125,135,145,150,106,66,76,86,96,116,126,
    136,146,156,160,107,77,87,97,117,127,137,147,
    157,167,170,108,88,98,118,128,138,148,158,168,
    178,180,109,99,119,129,139,149,59,169,179,189,
    190,110,200,201,111,121,122,132,142


  Farideh Firoozbakht





More information about the SeqFan mailing list