Problem 313
Sliding game
In a sliding game a counter may slide horizontally or vertically into an empty space. The objective of the game is to move the red counter from the top left corner of a grid to the bottom right corner; the space always starts in the bottom right corner. For example, the following sequence of pictures show how the game can be completed in five moves on a 2 by 2 grid.
Let S(m,n) represent the minimum number of moves to complete the game on an m by n grid. For example, it can be verified that S(5,4) = 25.
There are exactly 5482 grids for which S(m,n) = p2, where p < 100 is prime.
How many grids does S(m,n) = p2, where p < 106 is prime?
滑动游戏
在滑动游戏中,筹码可以水平或竖直地划入相邻的空位。游戏的目标是将网格左上角的红色筹码移动到右下角;开始时空格总是在右下角。下面的一系列图片演示了如何用五步完成2乘2网格的游戏。
记S(m,n)为完成m乘n网格的游戏所需的最少步数。例如,可以验证S(5,4) = 25。
一共有5482种网格使得S(m,n) = p2,其中p < 100是素数。
有多少种网格使得S(m,n) = p2,其中p < 106是素数?