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.

A285471 A labyrinth-sequence where the entry is the first digit of the sequence and the exit at infinity. (How to move in the labyrinth is explained in the Comments and Example sections).

Original entry on oeis.org

1, 3, 0, 5, 7, 9, 2, 20, 13, 15, 4, 18, 31, 38, 33, 35, 21, 8, 34, 37, 23, 17, 19, 6, 11, 78, 28, 50, 51, 25, 61, 39, 29, 81, 10, 16, 53, 27, 80, 14, 55, 57, 22, 59, 83, 30, 58, 85, 65, 12, 43, 70, 40, 71, 32, 52, 41, 73, 45, 47, 72, 42, 75, 49, 24, 54, 77
Offset: 1

Views

Author

Eric Angelini and Lars Blomberg, Apr 19 2017

Keywords

Comments

The aim is to enter the labyrinth on the first digit (here 1) and to visit each digit of the sequence exactly once. To move in the labyrinth is easy: when you land on an odd digit "o", you jump to the right over "o" digits; and when you land on an even digit "e", you jump to the left over "e" digits; as 0 (zero) is an even digit, if you land on a 0 you simply "slide" on the next digit to the left.
Autonomous "loops" inside the labyrinth are not allowed; this loop, for instance, is forbidden: [1,0,3,x,x,x,4].
The sequence is started with a(1) = 1 and always extended with the smallest possible integer not yet in the sequence.

Examples

			The sequence starts with 1,3,0,5,7,9,2,20,13,15,4,18,...
You land on the first "1" and then jump over 1 digit to the right: you land on 0; this 0 forces you to "slide" on the prior digit 3 (as 0 is even); this 3 sends you to the right, jumping over 3 digits: you land on 9; this 9 sends you to the right again, jumping over 9 digits: you land on 8; this 8 sends you to the left (as 8 is even), jumping over 8 digits: you land on the isolated integer 2; this 2 sends you again to the left, jumping over 2 digits: you land on 5; 5 sends you to the right (as 5 is odd), jumping over 5 digits: you land on 1; etc. All digits of the sequence will be visited once in this way.
		

Extensions

Corrected a(26) and beyond and clarified the Comment by Lars Blomberg, Apr 24 2017