[seqfan] Re: Knight's tour on infinite board
user42_kevin at yahoo.com.au
Wed May 8 07:09:14 CEST 2019
yae9911 at gmail.com (Hugo Pfoertner) writes:
> A306659 and A306660
Are you sure about first step to x=2, y=1 ? It has inner-most ring
slightly different than some code I wrote in the past and which I
believe matches A068608. (Math::PlanePath::KnightSpiral)
This makes A068608 from square spiral coordinates X=A174344, Y=A274923.
(Incidentally, maybe could tweak the name of A174344 to just "square
spiral" like A274923 has.)
Stepping to the outer ring is 2 moves of same direction. I thought it
attractive that the very first step is parallel to the later outward
steps. In your code it might be as simple as initial p+=move[2,].
But whatever works, is right, etc, of course.
I don't remember any particular reason I have each step-to-next-ring
occurring at the south-east corners. Maybe it was to traverse the east
side first. Others have done the pattern yet other ways around.
Eg. (as noted arriving at A068614, perhaps ...)
(Possible dodginess in the html colours might make the text invisible.
Try text mode like w3m, or delete the colours in the <BODY ...>)
More information about the SeqFan