%I #9 Dec 01 2019 23:15:08
%S 0,1,2,3,4,5,6,7,8,9,10,0,11,1,20,2,13,3,12,30,14,4,15,5,16,6,17,7,18,
%T 8,19,9,21,10,0,22,31,11,1,23,20,2,33,13,3,24,12,34,30,25,36,27,35,26,
%U 37,28,39,40,14,4,29,38,41,15,5,32,44,50,42,51,16,6,43,52,46,53,47,17,7,45,60,48,18,8,49,19,9,54,61,21,10,0
%N An irregular fractal sequence: underline all terms that share at least one digit with the preceding one. All underlined terms rebuild the starting sequence. (See the Comments section for more details.)
%C The sequence S starts with a(1) = 0 and a(2) = 1. S is extended by duplicating the first term A among the not yet duplicated terms, under the condition that A shares at least one digit with the last term Z of the sequence. If A doesn't share any digit with Z, we then extend the sequence with the smallest integer X not yet present in S and not sharing a digit with Z.
%H Jean-Marc Falcoz, <a href="/A306580/b306580.txt">Table of n, a(n) for n = 1..20002</a>
%e After S = 0, 1, ... we cannot extend S with 0 (first not yet duplicated term) because 0 doesn't share any digit with 1: S is then extended with 2 (because 2 is the smallest integer not yet present in S that doesn't share a digit with 1);
%e After S = 0, 1, 2, ... we still cannot extend S with 0: S is then extended with 3 (because 3 is the smallest integer not yet present in S that doesn't share a digit with 2);
%e After S = 0, 1, 2, 3, ... we still cannot extend S with 0: S is then extended with 4 (because 4 is the smallest integer not yet present in S that doesn't share a digit with 3);
%e [...]
%e After S = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... we must extend S with 0 as 0 shares a digit with 10;
%e After S = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, ... we cannot extend S with 1 (first not yet duplicated term) because 1 doesn't share any digit with 0: S is then extended with 11 (because 11 is the smallest integer not yet present in S that doesn't share a digit with 0);
%e After S = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, ... we must extend S with 1 as 1 shares a digit with 11;
%e After S = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, 1, ... we cannot extend S with 2 (next not yet duplicated term) because 2 doesn't share any digit with 1: S is then extended with 20 (because 20 is the smallest integer not yet present in S that doesn't share a digit with 1);
%e etc.
%K base,nonn,look
%O 1,3
%A _Eric Angelini_ and _Jean-Marc Falcoz_, Feb 24 2019
|