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.

A328698 Successive squares visited by a knight on the single-digit square spiral, with ties resolved by rotating left from direction of the last leap.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 2, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2, 1, 1, 1, 3, 2, 1, 1, 0, 2, 3, 2, 2, 1, 3, 1, 1, 1, 1, 1, 6, 2, 3, 4, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 5, 0, 1, 1, 1, 0, 0, 1, 0, 1, 2, 2, 0, 2, 0, 1, 2, 3, 0, 1, 1, 1
Offset: 0

Views

Author

Scott R. Shannon, Oct 25 2019

Keywords

Comments

This is a variation of sequence A326413 where, instead of taking the lowest x-coordinate of the two tied squares with the same board number and distance from the origin, rotate left (counterclockwise) from the direction of the last leap and choose the first of the two squares encountered.
For the sequence given here, if a tied square is directly in line with the last leap direction it is chosen last. The sequence is finite as after 644 steps a square with the number 7 is reached after which all eight surrounded squares have been visited.
For the sequence where a tied square which is directly in line with the last leap direction is chosen first, then there are 946 steps taken before the knight is trapped. The visited squares for this variation are given as a link.

Examples

			The digit-square spiral is
                                .
                                .
    2---2---2---1---2---0---2   2
    |                       |   |
    3   1---2---1---1---1   9   3
    |   |               |   |   |
    2   3   4---3---2   0   1   1
    |   |   |       |   |   |   |
    4   1   5   0---1   1   8   3
    |   |   |           |   |   |
    2   4   6---7---8---9   1   0
    |   |                   |   |
    5   1---5---1---6---1---7   3
    |                           |
    2---6---2---7---2---8---2---9
		

Crossrefs