Given a rectangular grid with $n$ rows and $m$ columns in which squares may be placed, what are minimum number of squares required so that the next square added cannot be placed in isolation?
Isolation is defined as not attached to a side of at least 1 another square. A square only attached to the corner of another square is still isolated.
Example:
I have developed a spreadsheet to try and solve this but it does so in a sum-what convoluted way. I also keep finding problems with it. It needs adapting to work with all small grids (eg 1 by x shapes where x is 5 or greater, 2x5 and 3x6). You may or may not find it useful. link to spreadsheet

