Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #17 Apr 10 2022 10:03:34
%S 1,4,7,16,19,36,39,64,67,100
%N Solution to Snake Numbers Problems for Snakes from 1 to n for an n X n square grid (see Comments).
%C 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.
%H Rodolfo Kurchan, <a href="http://www.puzzlefun.online/problems"> Puzzle Fun, Snake Number Problem</a>.
%F a(n) = n^2 for even n.
%e a(5) = 19 from Giorgio Vecchi:
%e +---+---+---+---+---+
%e | 2| 3| 4| 5| 1|
%e +---+---+---+---+---+
%e | 1| | | 3| 2|
%e +---+---+---+---+---+
%e | | 1| 5| 4| |
%e +---+---+---+---+---+
%e | 3| 2| | | 4|
%e +---+---+---+---+---+
%e | 4| 5| 1| 2| 3|
%e +---+---+---+---+---+
%e .
%e a(7) = 39 from Giorgio Vecchi.
%e a(9) = 67 from Giorgio Vecchi.
%e For odd n >= 3 the solutions up to now have a(n) = (n-1)^2+3.
%K nonn,more
%O 1,2
%A _Rodolfo Kurchan_, Apr 08 2022