Skip to main content
1 of 12
TonyK
  • 2.3k
  • 16
  • 15

For a 5 x 1 rectangle, the maximum sum is 25/7 = 3.571428... This value is attained in the following 29 x 25 symmetric grid (only the upper left quadrant given here):

  2  -3   1   1  -2   2   1   2   0   0   0   1  -3   0   0
 -2   0  -1   0   0  -3   2   1   0   0   1   2   1  -1   0
  0   2   0   0   0   0  -4   0  -2   0   1   1   2   0   0
  0   0   1   0   0   0   0  -2   2   0   3  -3   1   0   0
  1   0   0   0   0   1   1   0  -1   0   2  -4   2  -1  -2
  0   2   0   2  -1   0   0   0   0   0   2   2  -5  -2   0
  2   0   0  -1   1   0   1   0  -2  -2 -19  28   0  -6   0
 -4   1   2   2  -5  -6  -2   0   5   4   7 -28  28  -6   0
  0  -2  -3  -1   6   4  -2  -2  -3   3   7  -3 -22  19   0
  0   0   0   0   0   2  -1   0  -1  -2   6   0  -3  -8  10
  0   0   0   0   2   0   1   0   0  -2   3  -7   3  -2   0
 -1   0   0  -1   0   2  -2   2  -3   0   8  22 -22  -6   0
  2  -2   0   0  -4  -6   6  -4   8   8 -28 -28  28  22   0

The 5x1 rectangle is '28 22 0 22 28', with sum 100. All squares have -28 <= sum <= 28.

For a 6x1 rectangle, the maximum sum is 85/23 = 3.695652... which I think is attained in a 36x31 grid. My program and I will try to generate this grid tonight.

For a 7x1 rectangle, the maximum sum is 11/3 = 3.666666..., which is less than the 6x1 rectangle.

I will post more results as they come in.

TonyK
  • 2.3k
  • 16
  • 15