Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Nov 01 2024 05:10:56
%S 0,0,0,1,4,10,19,30,45,66,94,130,172,221,278,344,422,511,611,723,848,
%T 987,1140,1308,1491,1691,1909,2146,2401,2673,2965,3278,3614,3974,4355,
%U 4759,5186,5638,6117,6623,7156,7716,8305,8923,9571,10249,10958,11700,12475,13285,14127,15003,15914,16862,17849,18874,19937,21037,22177,23358,24581,25846,27153,28504
%N Number of non-intersecting unit cubes regularly packed into the tetrahedron of edge length n.
%C The tetrahedron may be aligned with the Cartesian axes by putting its triangular basis on the horizontal plane, with four vertices at (x, y, z) = (0, 0, 0), (n, 0, 0), (n/2, sqrt(3)*n/2, 0) and (n/2, n/(2*sqrt(3)), n*sqrt(2/3)) see A194082, A020769, A157697.
%C The volume of tetrahedron is a third times the area of the base triangle times height, (1/3) * (sqrt(3)*n^2/4) * n*sqrt(2/3) = n^3/(3*2^(3/2)) = A020829*n^3. This defines an obvious upper limit of floor(n^3/sqrt(72)) = A171973(n) of placing unit cubes into this tetrahedron.
%C Regular packing: We place the first layer of unit cubes so they touch the floor of the tetrahedron. Their number is limited by the area of the triangular horizontal section of the plane z=1 inside the tetrahedron, which touches all of them; this isosceles horizontal triangle has edge length E(n,z) = n-z*sqrt(3/2). This edge length is a linear interpolation for triangular horizontal cuts between z=0 at the bottom and the summit of the tetrahedron at z=n*sqrt(2/3).
%C This first layer confined by a triangle characterized by E(n,z) may host RegSquInTri(E) := sum_{y=1..floor(E*sqrt(3)/2)} floor(E-y*2/sqrt(3)) cubes, following recursively the same regular placement and counting strategy as for squares in isosceles triangles, see A194082.
%C The number of unit cubes in the next layer, between z=1 and z=2, is limited by the area of the horizontal section of the triangle z=2 inside the tetrahedron, where the triangle has edge length n-z*sqrt(3/2).
%C So in layer z=1, 2, ... we insert ReqSquInTri(E(n,z)) cubes. a(n) is the sum over all these layers with z limited by the z-value of the vertex at the summit.
%C There is a generalization to placing unit cubes of higher dimensions into higher dimensional tetrahedra.
%C The growth is expected to be roughly equal to the growth of A000292.
%H R. J. Mathar, <a href="/A219965/a219965.jpg">Illustration of 30 cubes at n=8</a>
%H R. J. Mathar, <a href="/A219965/a219965_1.jpg">Illustration of 66 cubes at n=10</a>
%H R. J. Mathar, <a href="/A219965/a219965_2.jpg">Illustration of 221 cubes at n=14</a>
%F a(n) <= A171973(n).
%p # Number or squares in isosceles triangle of edge length n.
%p RegSquInTri := proc(n)
%p add(floor(n-2*y/sqrt(3)), y=1..floor(n*sqrt(3)/2)) ;
%p end proc:
%p A219965 := proc(n)
%p local a,z,triedg ;
%p a := 0 ;
%p for z from 1 to floor(n*sqrt(2/3)) do
%p triedg := n-z*sqrt(3/2) ;
%p a := a+ RegSquInTri(triedg) ;
%p end do:
%p return a;
%p end proc:
%K nonn
%O 1,5
%A _R. J. Mathar_, Dec 02 2012