[seqfan] Re: Quick and fun permutation

M. F. Hasler oeis at hasler.fr
Tue Sep 30 00:06:02 CEST 2014


Dear Eric,
I get slightly different data after "30").
Proposed as https://oeis.org/draft/A248024

M.
(PARI)
{a(n,S=1,u=2)=for(i=1,n,print1(S",");for(k=1,9e9,bittest(u,k)&&next;S%digits(k)[1]&&next;u+=1<<S=k;break));S}

1, 10, 2, 11, 12, 3, 13, 14, 7, 15, 5, 16, 4, 17, 18, 6, 19, 100, 20,
21, 30, 22, 23, 101, 102, 24, 8, 25, 50, 26,...

On Mon, Sep 29, 2014 at 10:29 AM, Eric Angelini <Eric.Angelini at kntv.be> wrote:
> Hello SeqFans,
>
> Start S with a(1) = 1
> Extend S with the smallest integer not yet present
> whose leftmost digit divides a(n). I get (by hand,
> in a couple of seconds):
>
> S = 1,10,2,11,12,3,13,14,7,15,5,16,4,17,18,6,19,100,20,21,30,31,101,102,22,23,103,104,8,24,25,50,26,27,9,33,...



More information about the SeqFan mailing list