OFFSET
1,2
COMMENTS
This generalizes the 2D case, where an n X n grid has (n-1)^2 tiles, and the 3D case, where an n X n X n cube has 3n^3 - 6n^2 + 3n tiles.
In 4D, the hypercube is interpreted inductively as n 3D cubes arranged in a row along the fourth axis ("moving-cube" model).
Equivalently, this sequence counts the 2X2 tiles in the 3D projection ("shadow") of the 4D hypercube.
LINKS
Salvatore Ferraro, Number of tiles in a discrete 4D hypercube, Zenodo, 2025.
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = (n - 1)^2 * (3*n^2 + 2*n) = 3*n^4 - 4*n^3 - n^2 + 2*n.
G.f.: 4*x^3*(4 + 13*x + x^2)/(1 - x)^5. - Stefano Spezia, Aug 25 2025
EXAMPLE
a(2) = 16, a(3) = 132, a(4) = 504
MAPLE
a := n -> (n-1)^2*(3*n^2 + 2*n):
seq(a(n), n=1..40);
MATHEMATICA
a[n_] := (n - 1)^2*(3 n^2 + 2 n); Table[a[n], {n, 1, 40}]
PROG
(Python)
def a(n):
return (n - 1)**2 * (3*n**2 + 2*n)
print([a(n) for n in range(1, 41)])
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Salvatore Ferraro, Aug 25 2025
STATUS
approved
