Kneil's Knumberphile Knight

Hello Seqfans,

Remember this wonderful Numberphile video by Neil ("The trapped knight"):



Neil's spiral to number the infinite grid starts like this:

My spiral starts with zero (no importance) and extends itself counterclockwise (like Neil's) but with only one digit per cell (important):







In this variant, the Knight must always jump on the smallest available digit (and, like Neil's Knight, not on a cell previously visited).
When the Knight has a choice, always jump to the cell closest to the starting 0 (zero).
And if there is still a choice (between two cells), jump to the rightmost one (from the point of view of the Knight).
Coud someone help me in computing/drawing my Knight's journey?
But most important: will my Knight beat Neil's one – and get trapped later?
;-)
Best,
É.

P.-S.
How many 0s,1s, 2s... 9s have been visited before the trap?
Will the Knight ever jump on a 9?

____________________
Update, May 6, 00:20 (Brussels time)

Got this answer by Luca Petrone on SeqFan -- many thanks, Luca!

Dear Eric,
I simulated your variant of knight journey. The knight gets trapped after 1378 moves.
And this are the number of visit to each number :

0             288
1             457
2             227
3             171
4             107
5             59
6             36
7             17
8             8
9             8

Hope someone can check my values!
Regards,
Luca Petrone
____________________
Update, May 8, 22:00 (Brussels time)

Well, Luca checked again his values – and sent me this (with 2 beautiful illustrations): – many thanks again, Luca!

Pardon, Éric
but there was a bug in my code, and actually your knight was even poorer, getting trapped after 581 moves.
Anyhow, if you choose leftermost instead of rightermost, you have a better solution, getting trapped after 1217 moves.
Neil is always the best!
If you want, I can send you picture of the path (yes, please!-)
Goodbye
Luca
(rightermost = 581 jumps)

(leftermost = 1217 jumps)
#0 = 212
#1 = 388
#2 = 256
#3 = 182
#4 = 90
#5 = 45
#6 = 27
#7 = 9
#8 = 6
#9 = 2
____________________
Update, October 22nd, 2019

The above sequence is now https://oeis.org/A326413.

We have also this sequence (OEIS, here), with a little difference in selecting a path when two squares are "equivalent". Here is the comment by Scott R. Shannon:

> This sequence uses the same board numbering as A326413, and like that sequence, if the next step encounters two or more squares with the same square number, it then chooses the square which is the closest to the original 0-squared origin. But if two or more squares are found which also have the same distance to the origin, then the square which was first drawn in the spiral numbering is chosen i.e. the smallest standard spiral numbered square as per A316667.

The sequence is finite. After 1069 steps a square with the number 9 (standard spiral number = 473) is visited, after which all neighboring squares have been visited.

Scott's nice "black" image  is commented below (see the difference with Luca's picture, above? The "nose" is the same ;-) 



> Image showing the 1069 steps of the knight's path. The green dot is the first square with number 0 and the red dot the last 1070th square with number 9. The later is surrounded by blue dots to show the eight occupied squares (click to enlarge).
____________________

Scott has added two more sequences to the OEIS, on the same topic, with beautiful pictures: https://oeis.org/A326922 and https://oeis.org/A326931

Maximilian Hasler has published his own (clever) variation here.

Bravo to all!






Commentaires

Posts les plus consultés de ce blog

A square for three (chess)

Le tripalin se présente

Some strings au cinéma Galeries