What is the smallest number of straight lines with which you can make precisely 225 squares?
For example with five vertical and six horizontal lines, evenly spaced, 40 squares are formed: twenty 1x1, twelve 2x2, six 3x3 and two 4x4.
_______
|_|_|_|_|
|_|_|_|_|
|_|_|_|_|
|_|_|_|_|
|_|_|_|_|
18 lines is not enough. The largest number of squares that 18 lines can produce is those in a 8x8 grid, which is 204.
The most that 19 lines can yield is 240, from a 8x9 grid. This can be reduced to 225 by removing two corners, shortening the associated lines:
+--+--+--+--+--+--+--+--+
| | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | | |
+--+--+--+--+--+--+--+--+--+
| | | | | | | | |
+--+--+--+--+--+--+--+--+