

A328698


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


8



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,9


COMMENTS

This is a variation of sequence A326413 where, instead of taking the lowest xcoordinate 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.


LINKS

Scott R. Shannon, Table of n, a(n) for n = 0..644.
Scott R. Shannon, Image for the path. The starting square is shown in green, and final square in red. Each of the 6 yellow squares are where the next step was decided from two tied squares by a left rotation; the pink square shows the chosen square, and a gray square the other square. Also shown are the board numbers, and the step number in brackets, for each step.
Scott R. Shannon, Sequence values when a tied square directly ahead is chosen first.
Scott R. Shannon, Image for the path where tied square directly ahead is chosen first. This has 7 choice squares shown in yellow.
N. J. A. Sloane and Brady Haran, The Trapped Knight, Numberphile video (2019).


EXAMPLE

The digitsquare spiral is
.
.
2221202 2
  
3 12111 9 3
    
2 3 432 0 1 1
      
4 1 5 01 1 8 3
     
2 4 6789 1 0
   
5 151617 3
 
26272829


CROSSREFS

Cf. A326413, A316667.
Sequence in context: A326413 A329171 A326918 * A317529 A285194 A039978
Adjacent sequences: A328695 A328696 A328697 * A328699 A328700 A328701


KEYWORD

nonn,fini,full


AUTHOR

Scott R. Shannon, Oct 25 2019


STATUS

approved



