login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A336895 The prime sandwiches sequence (see Comments lines for definition). 1
1, 22, 2, 3, 225, 33, 7, 25, 11, 331, 37, 71, 72, 5, 19, 112, 3312, 9, 373, 17, 13, 77, 24, 15, 54, 31, 94, 712, 53, 32, 59, 99, 6, 133, 67, 177, 113, 73, 777, 92, 4, 8, 315, 89, 549, 731, 10, 194, 103, 7210, 75, 310, 93, 21, 135, 91, 27, 991, 316, 61, 371, 313, 96, 714, 917, 151, 131, 57 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
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 prime p not yet inserted in a sandwich. The pair [1951, 2020] would then produce the sandwich 1p2. Please note that the pair [2020, 1951] would produce the genuine sandwich 0p1 (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.
LINKS
EXAMPLE
The first successive sandwiches are: 122, 232, 253, 372, 5113, 3137,...
The 1st one (122) is visible between a(1) = 1 and a(2) = 22 (insert 2).
The 2nd one (232) is visible between a(2) = 22 and a(3) = 2 (insert 3).
The 3rd one (253) is visible between a(3) = 2 and a(4) = 3 (insert 5).
The 4th one (372) is visible between a(4) = 3 and a(5) = 225 (insert 7).
The 5th one (5113) is visible between a(5) = 225 and a(6) = 33 (insert 11); etc.
The successive sandwiches rebuild, digit by digit, the starting sequence.
CROSSREFS
Cf. A336894 (empty sandwiches), A335600 (poor sandwiches).
Sequence in context: A040476 A040480 A040479 * A040481 A058288 A040482
KEYWORD
base,nonn
AUTHOR
Carole Dubois and Eric Angelini, Aug 07 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 10:37 EDT 2024. Contains 371709 sequences. (Running on oeis4.)