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.

A306656 Number of ways to fill a 3D matrix with n distinct values.

This page as a plain text file.
%I A306656 #24 Feb 02 2025 04:26:40
%S A306656 1,1,6,18,144,360,6480,15120,403200,2177280,32659200,119750400,
%T A306656 8622028800,18681062400,784604620800,11769069312000,313841848320000,
%U A306656 1067062284288000,115242726703104000,364935301226496000,43792236147179520000,459818479545384960000
%N A306656 Number of ways to fill a 3D matrix with n distinct values.
%C A306656 This sequence is a generalization of A323295 to the 3D case. Usually, in multidimensional data related applications (i.e., images, MRI), data is vectorized and then processed. However, because of vectorization, the spatial information in the data is lost. This reverse mapping shows the possible number of spatial states the original data could have been in.
%F A306656 a(n) = A007425(n) * n! for n > 0, a(0) = 1.
%e A306656 For n = 6, a(6) = 6480, A007425(6) = 9 namely there are 9 ways to arrange 6 voxels into a 3D matrix: [1,1,6], [1,6,1], [6,1,1], [2,3,1], [3,2,1], [2,1,3], [3,1,2], [1,2,3], [1,3,2]. Then there are 6! ways to fill it with the numbers. 9*6! = 6480.
%p A306656 with(numtheory):
%p A306656 a:= n-> `if`(n=0, 1, add(tau(d), d=divisors(n))*n!):
%p A306656 seq(a(n), n=0..23);  # _Alois P. Heinz_, Mar 03 2019
%t A306656 A007425[n_] := DivisorSigma[0, #]& /@ Divisors[n] // Total;
%t A306656 a[n_] := If[n == 0, 1, A007425[n]*n!];
%t A306656 Table[a[n], {n, 0, 21}] (* _Jean-François Alcover_, Feb 02 2025 *)
%Y A306656 Cf. A007425, A077592, A323295.
%K A306656 nonn
%O A306656 0,3
%A A306656 _Yigit Oktar_, Mar 03 2019
%E A306656 More terms from _Alois P. Heinz_, Mar 03 2019