A361388 Number of orders of distances to vertices of n-dimensional cube.
1, 2, 8, 96, 5376, 1981440, 5722536960, 138430238607360
Offset: 0
Examples
For n=3, a 3-dimensional cube has 8 corners, numbered 0 to 7. A point can be closest to any of the 8 corners. A point closest to 0 can have distances to corners 1, 2, and 4 in any of 6 orders. A point whose distances to corners 0, 1, 2, and 4 are in increasing order can be closer to 3 than to 4, or closer to 4 than to 3. So the total number of orders is 8*6*2=96.
Links
- Pierre Abbat, Cubeorders
Crossrefs
Cf. A009997.
Programs
-
PARI
A361388(n) = A009997(n)*n!<
M. F. Hasler, Mar 10 2023 -
Sage
def a(n): x = polygens(QQ,n,'x') dist2 = [sum((xi - ti)^2 for xi,ti in zip(x,t)) for t in Tuples(range(2),n)] # squared distances diffs = {p[0]-p[1] for p in Combinations(dist2,2)} # set of pairwise differences of squared distances H = HyperplaneArrangements(QQ, tuple(map(str,x))) A = H([[[d.coefficient({xi:1}) for xi in x], d.constant_coefficient()] for d in diffs]) return A.n_regions() print( [a(n) for n in (1..4)] ) # Max Alekseyev, Mar 10 2023 (C++) // See Cubeorders link.
Formula
a(n) = 2^n*n!*A009997(n).
Comments