OFFSET
1,2
COMMENTS
Start with an n X n square grid. Each cell has neighbors horizontally, vertically and diagonally. Place the numbers 1 to n anywhere. Now place the numbers n+1, n+2, ..., m in order, subject to the rule that when you place k, the sum of its neighbors must equal k. Then a(n) is the maximum m that can be achieved.
LINKS
Rudolfo Kurchan, Puzzle Fun
EXAMPLE
4 X 4 solution with m = a(4) = 12 from Hector San Segundo:
+---+---+---+---+
| | 10| 3 | 8 |
+---+---+---+---+
| | 6| 1| 4|
+---+---+---+---+
| | 2| | 5|
+---+---+---+---+
| 11| 9| 7| 12|
+---+---+---+---+
4 = 1 + 3, 5 = 1 + 4, 6 = 1 + 2 + 3, 7 = 2 + 5, 8 = 1 + 3 + 4, 9 = 2 + 7, 10 = 1 + 3 + 6, 11 = 2 + 9, 12 = 5 + 7.
5 X 5 solution with m = a(5) = 19 from Pontus von Brömssen:
+---+---+---+---+---+
| 5| 6| 7| 8| 18|
+---+---+---+---+---+
| 11| | 1| | 10|
+---+---+---+---+---+
| 14| | 19| 2| 16|
+---+---+---+---+---+
| | 3| 9| 4| |
+---+---+---+---+---+
| 15| 12| | 13| 17|
+---+---+---+---+---+
.
One of 10 6 X 6 solutions (up to rotations and reflections) with m = a(6) = 25 from Pontus von Brömssen, Apr 15 2022:
+---+---+---+---+---+---+
| 22| 1| 15| 19| | 20|
+---+---+---+---+---+---+
| 7| 14| | | 4| 16|
+---+---+---+---+---+---+
| | 6| | 21| | 12|
+---+---+---+---+---+---+
| 17| | 9| | 8| 25|
+---+---+---+---+---+---+
| | 11| | 3| 5| |
+---+---+---+---+---+---+
| 24| 13| 2| 10| 18| 23|
+---+---+---+---+---+---+
.
a(7) = 34 from Giorgio Vecchi.
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Rodolfo Kurchan, Apr 04 2022
EXTENSIONS
a(6) corrected by Pontus von Brömssen, Apr 15 2022
STATUS
approved