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.

A343540 Squares visited by a trapped knight on a square-spiral numbered board where the knight is shifted one square up and one square to the right after each move.

Original entry on oeis.org

1, 10, 7, 6, 5, 4, 3, 12, 13, 8, 9, 44, 45, 42, 41, 40, 39, 18, 17, 16, 15, 14, 11, 26, 27, 28, 29, 30, 31, 34, 33, 32, 35, 62, 61, 38, 37, 64, 63, 98, 97, 96, 95, 94, 93, 56, 53, 50, 47, 114, 73, 154, 109, 108, 107, 106, 105, 104, 103, 102
Offset: 1

Views

Author

Simon S. Gurvets, Apr 18 2021

Keywords

Comments

The squares are numbered starting with 1 at the origin (0,0). The sequence is finite: when arriving on square number a(180) = 157, there is no free square within reach for the next move.
Shifting the knight only 1 square to the right leads to an infinite sequence. Similarly, shifting only 1 square up leads to an infinite sequence. More generally, if the knight jumps (1,n) spaces and is shifted m squares to the right, m > n leads to an infinite sequence.