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.

A336904 The natural sandwiches sequence (see Comments lines for definition).

Original entry on oeis.org

11, 2, 22, 223, 23, 4, 235, 44, 6, 25, 7, 448, 66, 9, 2510, 77, 1, 14, 8, 12, 661, 3, 99, 1420, 15, 771, 61, 117, 141, 88, 81, 91, 220, 612, 13, 32, 29, 92, 310, 24, 152, 5, 71, 26, 6127, 17, 28, 112, 98, 830, 813, 19, 132, 20, 33, 62, 34, 133, 53, 236, 293, 79, 238, 30, 39, 2440, 124, 155, 42, 714
Offset: 1

Views

Author

Carole Dubois and Eric Angelini, Aug 07 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 smallest natural number N not yet inserted into a sandwich. The pair [1951, 2020] would then produce the natural sandwich 1N0. Please note that the pair [2020, 1951] would produce the genuine sandwich 0N1 (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: 112, 222, 232, 342, 354, 462,...
The 1st one (112) is visible between a(1) = 11 and a(2) = 2; we get the sandwich by inserting 1 between 1 and 2.
The 2nd sandwich (222) is visible between a(2) = 2 and a(3) = 22; we get this sandwich by inserting 2 between 2 and 2.
The 3rd sandwich (232) is visible between a(3) = 22 and a(4) = 223; we get this sandwich by inserting 3 between 2 and 2;
The 4th sandwich (342) is visible between a(4) = 223 and a(5) = 23; we get this sandwich by inserting 4 between 3 and 2; etc.
The successive sandwiches rebuild, digit by digit, the starting sequence.
		

Crossrefs

Cf. A335600.