A 2 by X rectangle can obviously have 2*X circles of diameter 1 placed inside it without overlapping. What is the smallest integer X where a 2 by X box can have 2*X+1 nonoverlapping circles placed inside it?
In my work, I made the radius 1 instead of the diameter. This will not affect the value of X. We seek to fit 2X+1 circles in a rectangle that is 4 by 2X.
All but the first and last of the circles will be in groups of 3 mutually tangent circles. If the first and last circles go in the upper corners. There is an odd number of trios which will alternate touching the bottom and top sides.
Each trio saves a little bit of space. The upper circle of a bottom trio will be tangent to the first circle of the next trio, but the horizontal displacement will be sqrt(4sqrt(3)3) which is about 1.98197 Just under 2. With enough circles, there will be enough savings to allow an extra circle.
Let A=sqrt(4sqrt(3)3)
Let the number of circles be of the form 6n+5. The width of the rectangle is (2n+2)+(2n+2)X.
Setting the expressions equal and solving gives n=26.73
So if n=27, X=167 and the circles fit in a rectangle of width 56+56A=166.990
So 166 circles fit in a 2 by 83 rectangular array in a 4 by 166 box. Adding the 167th circle would require us to expand the box to 168.
Using the triangles configuration we can instead fit 167 in a 4 by 167. On each in the upper corners plus 28 triangles of three that touch the bottom alternating with 27 triangles that touch the top.

This isn't optimal though. If the first triangle is relaxed a bit so that its upper circle sinks down a bit, the corner circle can come in a little bit. Do this at both ends and you can save a bit of room.
Actually here's a link where the first two triangles are relaxed but something is strange because this appears to take 329 circles to fit in a smaller box than 328. That's about twice my reckoning.

Posted by Jer
on 20190407 17:50:04 