cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A308387 Lexicographically earliest self-describing sequence of distinct terms such that, when we read digit after digit from the left to the right, the n-th digit of the sequence is duplicated at the digit-position a(n). After all duplications are done, the resulting sequence is itself.

This page as a plain text file.
%I A308387 #27 Sep 26 2021 23:22:58
%S A308387 2,20,6,10,8,11,60,5,13,4,3,19,52,16,24,14,9,27,12,1,17,36,28,15,21,
%T A308387 43,18,23,34,61,37,25,30,68,100,22,31,7,32,56,47,33,26,35,39,38,41,44,
%U A308387 48,73,59,42,49,130,64,40,53,62,51,46,45,58,101,55,70,57,86
%N A308387 Lexicographically earliest self-describing sequence of distinct terms such that, when we read digit after digit from the left to the right, the n-th digit of the sequence is duplicated at the digit-position a(n). After all duplications are done, the resulting sequence is itself.
%H A308387 Lars Blomberg, <a href="/A308387/b308387.txt">Table of n, a(n) for n = 1..7000</a>
%H A308387 Eric Angelini, <a href="https://cinquantesignes.blogspot.com/2019/03/two-self-describing-sequences-for.html">Two self-describing sequences</a>.
%e A308387 The sequence starts with 2,20,6,10,8,11,60,...
%e A308387 The 1st digit (2) is duplicated at position 2 in the sequence, as a(1) = 2 (this new 2 is visible in 20);
%e A308387 The 2nd digit (2) is duplicated at position 20 in the sequence, as a(2) = 20 (this new 2 is visible in 52);
%e A308387 The 3rd digit (0) is duplicated at position 6 in the sequence, as a(3) = 6 (this new 0 is visible in 10);
%e A308387 The 4th digit (6) is duplicated at position 10 in the sequence, as a(4) = 10 (this new 6 is visible in 60);
%e A308387 The 5th digit (1) is duplicated at position 8 in the sequence, as a(5) = 8 (this new 1 is visible in 11, first digit); etc.
%e A308387 The duplication rule is: a(n) cannot command the duplication of one of its own digits - else the lexicographically first sequence would simply be 1, 2, 3, 4, 5, ... where every digit is "duplicated" on itself. We see with this counterexample that the sequence cannot start with a(1) = 1 as this digit 1 would be duplicated on itself; but a(1) = 2 is ok as there is an unused integer a(2) that starts with the duplicated 2 (here, 20, as 20 is the smallest unused term starting with 2); etc.
%e A308387 Why is a(3) = 6?
%e A308387 We must remember that a(3) = k means that the 3rd digit of the sequence is duplicated at digit-position k (counting digit after digit from the beginning); as the 3rd digit of the sequence is 0 (the 0 visible in 20), we cannot have a(3) = 1, which would be a contradiction (the 1st digit is a 2 and not a 0): so this start is impossible: 2,20,1,...
%e A308387 a(3) = 2 is impossible too, as there is already a term 2 in the sequence;
%e A308387 a(3) = 3 is impossible, as this would duplicate 0 on itself (forbidden);
%e A308387 a(3) = 4 is impossible too, see: 2,20,4,... The 3rd digit, 0, cannot be duplicated in digit-position 4 as this position is already occupied by 4 itself!
%e A308387 a(3) = 5 is impossible too, because no term can have a leading 0, see: 2,20,5,0,... and the try 2,20,10,... is lexicographically worse then the solution coming now;
%e A308387 But a(3) = 6 works: 2,20,6,.0 (the dot is a free space, available for a digit that will stick to the 0); thus a(4) = 10, the smallest unused integer that produces no contradiction (this 10, being the 4th term of the sequence, commands the duplication of the 4th digit (6) at the digit-position 10 in the sequence; this is ok for the moment: 2,20,6,10,...6...
%e A308387 Etc.
%Y A308387 A347691 is the inverse.
%Y A308387 Cf. A308386 (illustrates the same idea, but with letters instead of digits).
%K A308387 base,nonn
%O A308387 1,1
%A A308387 _Eric Angelini_, May 23 2019