OFFSET
1,2
COMMENTS
On an n X n square board we draw a path with squares that we number 1, 2, ..., n, 1, 2, ..., n, 1, ... of the greatest length, which will be a(n). The path advances from one number to the next horizontally or vertically, not diagonally, after n it goes back to number 1. The path cannot cross itself. There cannot be repeated numbers in the same row or column.
LINKS
Rodolfo Kurchan, Puzzle Fun, Snake Number Problem.
FORMULA
a(n) = n^2 for even n.
EXAMPLE
a(5) = 19 from Giorgio Vecchi:
+---+---+---+---+---+
| 2| 3| 4| 5| 1|
+---+---+---+---+---+
| 1| | | 3| 2|
+---+---+---+---+---+
| | 1| 5| 4| |
+---+---+---+---+---+
| 3| 2| | | 4|
+---+---+---+---+---+
| 4| 5| 1| 2| 3|
+---+---+---+---+---+
.
a(7) = 39 from Giorgio Vecchi.
a(9) = 67 from Giorgio Vecchi.
For odd n >= 3 the solutions up to now have a(n) = (n-1)^2+3.
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Rodolfo Kurchan, Apr 08 2022
STATUS
approved