cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A387286 Number of 2 X 2 square tiles in a discrete 4-dimensional hypercube of side length n.

Original entry on oeis.org

0, 16, 132, 504, 1360, 3000, 5796, 10192, 16704, 25920, 38500, 55176, 76752, 104104, 138180, 180000, 230656, 291312, 363204, 447640, 546000, 659736, 790372, 939504, 1108800, 1300000, 1514916, 1755432, 2023504, 2321160, 2650500, 3013696, 3412992, 3850704, 4329220, 4851000, 5418576, 6034552, 6701604, 7422480
Offset: 1

Views

Author

Salvatore Ferraro, Aug 25 2025

Keywords

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.

Examples

			a(2) = 16, a(3) = 132, a(4) = 504
		

Crossrefs

Cf. A000290 (squares, 2D case), A270205 (3D case).

Programs

  • 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}]
  • Python
    def a(n):
        return (n - 1)**2 * (3*n**2 + 2*n)
    print([a(n) for n in range(1, 41)])

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