Place the numbers 1 to 25 on the cells of this board so that any two consecutive numbers occupy cells that are horizontally, vertically or diagonally adjacent. Prime numbers should occupy shaded cells.
-
5$\begingroup$ I don't get it. A bishop's walk could only visit half the cells. Shouldn't it be a King's walk? $\endgroup$– Eric DuminilSep 21, 2021 at 7:03
-
2$\begingroup$ There are 8568 solutions (counting rotations and flips). These could be grouped into 192 permutations for the prime cells. The number 23 occurs in the middle ~72% of the time. $\endgroup$– Markus JarderotSep 21, 2021 at 12:53
-
1$\begingroup$ @EricDuminil Right! Fixed! $\endgroup$– Bernardo Recamán SantosSep 21, 2021 at 13:15
2 Answers
Like so?
The beginning seems almost forced (apart from symmetries), and the rest just fell in place on the first attempt.
-
$\begingroup$ Almost but not quite (forced, that is): 25 3 4 5 6 // 2 24 22 21 7 // 14 1 23 8 20 // 13 15 16 9 19 // 12 11 10 17 18 $\endgroup$ Sep 20, 2021 at 21:19
As there are quite a few possible solutions and seeing that it is "A Bishop's Walk" here is one that tries to use as many bishopy (aka diagonal) moves as possible:
1 3 25 23 - 22 | / | | / / 2 4 24 21 19 \ X | 8 6 - 5 18 20 | X \ 7 9 12 15 17 / / X \ | 10 - 11 14 - 13 16