[seqfan] Re: The a(n)th digit of the sequence is visible in a(n).

M. F. Hasler oeis at hasler.fr
Sat Sep 27 16:06:32 CEST 2014


Hello Eric, Seqfans,

sorry for forgetting about the must-be-permutation constraint in my earlier
remark...
Now I wrote a PARI 2-3-liner to compute the sequence, but it differs
slightly from yours (starting with an 89 instead of your 99 preceding
10,20...)
My code is so simple that it's probable I forgot something, but I don't
know what it could be. (To be honest, I did not think about it very long
(*shame*)...)
Here's what I get for S(1..100):

S=1,2,3,4,5,6,7,8,9,11,13,15,17,19,21,22,25,27,29,31,23,33,37,39,41,24,44,47,49,51,53,45,55,59,61,26,46,66,69,71,73,75,67,77,81,28,48,
68,88,91,93,95,97,89,10,20,40,60,80,111,14,16,18,12,112,42,62,82,113,34,36,38,30,114,116,74,90,52,35,56,58,50,121,65,118,101,117,57,
78,70,123,85,87,110,92,94,96,79,100,200,...

(PARI)
EA(nMax,d=[],u=0)={for(n=1,nMax,for(k=1,9e9,bittest(u,k)&&next;
for(j=1,#dk=digits(k),setsearch(Set(digits(#d+j)),dk[j])||next(2));
d=concat(d,digits(k));u+=1<<k;print1(k",");next(2));error)}

Best,
M.

On Thu, Sep 25, 2014 at 5:37 PM, Eric Angelini <Eric.Angelini at kntv.be>
wrote:

>
> Hello SeqFans,
>
>
> S=1,2,3,4,5,6,7,8,9,11,13,15,17,19,21,22,25,27,29,31,23,33,37,39,41,24,44,47,49,51,53,45,55,59,61,26,46,66,69,71,73,75,67,77,81,28,48,68,88,91,93,95,97,99,10,20,40,60,80,111,14,16,18,12,112,42,62,82,113,34,36,38,30,114,116,74,90,52,35,56,58,50,121,65,118,117,115,57,78,70,123,85,87,89,119,94,96,79,92,100,...
>
> This is the lexico-first permutation of
> the integers > 0 such that the a(n)th
> digit of the sequence is visible in a(n).
>
> Example (read from the present end of S):
> - the 100st digit of S is 1
> - the 92nd digit of S is 9
> - the 79th digit of S is 7
> - the 96th digit of S is 9, etc.
>
> Best,
> É.



More information about the SeqFan mailing list