OFFSET
1,1
COMMENTS
Imagine we would have a pair of adjacent integers in the sequence like [1951, 2020]. The sandwich would then be made of the rightmost digit of a(n), the leftmost digit of a(n+1) and, in between, the sum of those two digits. The pair [1951, 2020] would then produce the (rich) sandwich 132. (Why rich? Because a poor sandwich would insert the absolute difference of the digits instead of their sum - that is 112 in this example). Please note that the pair [2020, 1951] would produce the rich and genuine sandwich 011 (we keep the leading zero: these are sandwiches after all, not integers).
Now we want the sequence to be the lexicographically earliest sequence of distinct positive terms such that the successive sandwiches emerging from the sequence rebuild it, digit after digit.
EXAMPLE
The first successive sandwiches are: 9101, 011, 121, 121, 231, 132,...
The first one (9101) is visible between a(1) = 9 and a(2) = 10; we get the sandwich by inserting the sum 10 between 9 and 1.
The second sandwich (011) is visible between a(2) = 10 and a(3) = 101; we get this sandwich by inserting the sum 1 between 0 and 1.
The third sandwich (121) is visible between a(3) = 101 and a(4) = 1; we get this sandwich by inserting the sum 2 between 1 and 1; etc.
The successive sandwiches rebuild, digit by digit, the starting sequence.
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Jul 31 2020
STATUS
approved