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.

A336690 The rich sandwiches sequence (see Comments lines for definition).

Original entry on oeis.org

9, 10, 101, 1, 12, 11, 2, 123, 113, 22, 3, 13, 4, 135, 225, 33, 41, 37, 44, 5, 15, 7, 25, 8, 337, 414, 371, 14, 49, 55, 6, 151, 27, 79, 251, 38, 81, 137, 114, 47, 31, 21, 48, 491, 45, 51, 16, 67, 1132, 71, 479, 112, 143, 816, 812, 17, 814, 84, 710, 313, 215, 481, 24, 154, 510, 512, 161, 26, 78, 129, 715, 4910
Offset: 1

Views

Author

Eric Angelini and Carole Dubois, Jul 31 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 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.

Examples

			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

Cf. A335600 (the poor sandwiches sequence).