Two related "drunken ophthalmologist's sequences"

zak seidov zakseidov at yahoo.com
Tue Dec 12 05:31:37 CET 2006


Dear seqfans,

Two related "drunken ophthalmologist's sequences"
(cf.
http://www.cetteadressecomportecinquantesignes.com/Commas.htm
),

with %K base, dull, less, obsc, uned, etc.

Zak

%N DO1 a(1)=1, a(n) = smallest  number b not among
a(1)..a(n-1) 
such that the last digit of b = the first digit of
a(n-1) , (and mod(b,10)>0).


%S DO1
1,11,21,12,31,13,41,14,51,15,61,16,71,17,81,18,91,19,101,111,121,131,141,
151,161,171,181,191,201,22,32,23,42,24,52,25,62,26,72,27,82,28,92,29,102,
211,112,221,122,231,132,241,142,251,152,261,162,271,172,281,182,291,192,
301,33,43,34,53,35,63,36,73,37


%t DO1 a=1;
s={a};Do[fi=IntegerDigits[a][[1]];Do[la=IntegerDigits[i][[-1]];

If[fi==la&&FreeQ[s,i]&&Mod[i,10]>0,AppendTo[s,i];a=i;Break[]],{i,11,10^5}],{1000}];s

%t DO1 Cf. DO2. If you look somewhere inside the both
sequences you couldn't 
decide which sequence it is:  D01 or D02 ,
 hence "drunken ophthalmologist's sequences".
You should check first terms to be sure how to
continue the sequence!
There's really some problems with eyes! 
Also note some nice (or ugly?) patterns in graphs. 

%A DO1  Someone with weakened eyes, Zak


%N DO2 a(1)=1, a(n) = smallest  number b not among
a(1)..a(n-1) 
such that the first digit of b = the last digit of
a(n-1) , (and mod(b,10)>0).


%S DO2
1,11,12,21,13,31,14,41,15,51,16,61,17,71,18,81,19,91,101,102,22,23,32,24,42,25,52,
26,62,27,72,28,82,29,92,201,103,33,34,43,35,53,36,63,37,73,38,83,39,93,301,104,44,
45,54,46,64,47,74,48,84,49,94,401,105,55,56,65,57,75,58,85,59,95,501,106,66,67,76,
68,86,69,96,601,107,77,78,87,79,97,701,108,88,89,98,801,109,99,901,111,112


%t DO2 a=1;
s={a};Do[la=IntegerDigits[a][[-1]];Do[fi=IntegerDigits[i][[1]];

If[fi==la&&FreeQ[s,i]&&Mod[i,10]>0,AppendTo[s,i];a=i;Break[]],{i,11,10^5}],{100}];s

%t DO2 Cf. DO1 If you look somewhere inside the both
sequences you couldn't 
decide which sequence it is: D01 or D02 ,
 hence "drunken ophthalmologist's sequences".
You should check first terms to be sure how to
continue the sequence!
There's really some problems with eyes! 
Also note some nice (or ugly?) patterns in graphs. 

%A DO2  Someone with weakened eyes, Zak






 
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com






More information about the SeqFan mailing list