Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #10 Dec 05 2024 12:58:51
%S 1,2,1,3,4,2,1,5,6,3,7,8,4,2,1,9,20,5,22,21,24,6,3,26,23,28,7,30,25,
%T 31,33,32,8,4,2,1,34,27,9,35,36,20,5,38,22,29,21,37,39,40,24,6,3,42,
%U 26,41,23,43,44,28,7,46,45,30,47,25,48,49,50,31,51,33,53,54,52,32,8,4,2,1,55,56,34,57,27,9,58,35,59,60,36
%N An irregular fractal sequence: underline a(n) iff [a(n-1) + a(n)] is divisible by the leftmost digit of a(n); all underlined terms rebuild the starting sequence.
%C The sequence S starts with a(1) = 1 and a(2) = 2. S is extended by duplicating the first term A among the not yet duplicated terms of S, under the condition that the sum [a(n-1) + a(n)] is divisible by the leftmost digit of a(n). If this is not the case, we then extend S with the smallest integer X not yet present in S such that the sum [a(n-1) + a(n)] is not divisible by the leftmost digit of a(n). This is the lexicographically earliest sequence with this property.
%H Jean-Marc Falcoz, <a href="/A306805/b306805.txt">Table of n, a(n) for n = 1..10002</a>
%e S starts with a(1) = 1 and a(2) = 2.
%e Can we duplicate a(1) to form a(3)? Yes, as the sum [a(2) + a(3) = 3] is divisible by 1, the leftmost digit of a(3); thus a(3) = 1.
%e Can we duplicate a(2) to form a(4)? No, as the sum [a(3) + a(4) = 3] is not divisible by 2, the leftmost digit of a(4); we thus extend S with the smallest integer X not yet in S such that the sum [a(3) + X] is not divisible by the leftmost digit of a(4); thus a(4) = 3.
%e Can we duplicate a(2) to form a(5)? No, as the sum [a(4) + a(5) = 7] is not divisible by 2, the leftmost digit of a(5); we thus extend S with the smallest integer X not yet in S such that the sum [a(4) + X] is not divisible by the leftmost digit of a(5); thus a(5) = 4.
%e Can we duplicate a(2) to form a(6)? Yes, as the sum [a(5) + a(6) = 6] is divisible by 2, the leftmost digit of a(6); thus a(6) = 2.
%e Can we duplicate a(3) to form a(7)? Yes, as 1 can always be duplicated; thus a(7) = 1.
%e Can we duplicate a(4) to form a(8)? No, as the sum [a(7) + a(8) = 5] is not divisible by 2, the leftmost digit of a(8); we thus extend S with the smallest integer X not yet in S such that the sum [a(7) + X] is not divisible by the leftmost digit of a(8); thus a(8) = 5.
%e Can we duplicate a(4) to form a(9)? No, as the sum [a(8) + a(9) = 8] is not divisible by 3, the leftmost digit of a(9); we thus extend S with the smallest integer X not yet in S such that the sum [a(8) + X] is not divisible by the leftmost digit of a(9); thus a(9) = 6.
%e Can we duplicate a(4) to form a(10)? Yes, as the sum [a(9) + a(10) = 9] is divisible by 3, the leftmost digit of a(10); thus a(10) = 3.
%e Etc.
%K base,nonn
%O 1,2
%A _Eric Angelini_ and _Jean-Marc Falcoz_, Mar 11 2019