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.

A335600 The poor sandwiches sequence (see Comments lines for definition).

Original entry on oeis.org

2, 1, 110, 10, 1101, 11010, 3, 330, 30, 3303, 33030, 4, 440, 40, 4404, 44040, 5, 550, 50, 5505, 55050, 6, 660, 60, 6606, 66060, 7, 770, 70, 7707, 77070, 8, 880, 80, 8808, 88080, 9, 990, 90, 9909, 99090, 11, 101, 1010, 22, 20, 202, 220, 2022, 2020, 33, 303, 3030, 44, 404, 4040, 55, 505, 5050, 66, 606, 6060, 77
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Jun 15 2020

Keywords

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 absolute difference of those two digits. The pair [1951, 2020] would then produce the (poor) sandwich 112. (Why poor? Because a rich sandwich would insert the sum of the digits instead of their absolute difference - that is 132 in this example). Please note that the pair [2020, 1951] would produce the poor 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.

Examples

			The first successive sandwiches are: 211, 101, 011, 011, 101, 033,...
The first one (211) is visible between a(1) = 2 and a(2) = 1; we get the sandwich by inserting the difference 1 between 2 and 1.
The second sandwich (101) is visible between a(2) = 1 and a(3) = 110; we get this sandwich by inserting the difference 0 between 1 and 1.
The third sandwich (011) is visible between a(3) = 110 and a(4) = 10; we get this sandwich by inserting the difference 1 between 0 and 1; etc.
The successive sandwiches rebuild, digit by digit, the starting sequence.
		

Crossrefs

Cf. A086005 (Semiprimes sandwiched between semiprimes).