A376215 Maximum number of non-overlapping discs with a diameter of 1 that can fit within an n×n square, using hexagonal packing or square packing, whichever is more efficient.
1, 4, 9, 16, 25, 36, 49, 68, 85, 105, 126, 150, 175, 216, 247, 279, 314, 350, 389, 429, 492, 538, 585, 635, 686, 740, 822, 880, 941, 1003, 1068, 1134, 1203, 1307, 1380, 1456, 1533, 1613, 1694, 1817, 1904, 1992, 2083, 2175, 2270, 2366, 2511, 2613, 2716, 2822, 2929, 3039
Offset: 1
Links
Crossrefs
Cf. A084617.
Programs
-
Python
from math import isqrt def A376215(n): return max(n**2,n*(m:=1+isqrt(((n-1)**2<<2)//3))-(m>>1)) # Chai Wah Wu, Nov 06 2024
Formula
a(n) = max(n^2,n*floor(1+2*(n-1)/sqrt(3)) - floor(floor(1+2*(n-1)/sqrt(3))/2));
Comments