This site is supported by donations to The OEIS Foundation.

# Generalizations of the factorial

Generalizations of the factorial are considered by observing that, for a nonnegative integer ${\displaystyle n}$, we have (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle n!:=\prod _{k=1}^{n}k=\prod _{k=1}^{n}\gcd(k)=\prod _{k=1}^{n}\operatorname {lcm} (k),\quad n\geq 0,}$

where ${\displaystyle \gcd }$ is the greatest common divisor, ${\displaystyle \operatorname {lcm} }$ is the least common multiple and where we multiply the entries of an ${\displaystyle n}$ vector (a tensor of rank 1), either the degenerate ${\displaystyle [\gcd(k)=k]_{k=1..n}}$ or the degenerate ${\displaystyle [\operatorname {lcm} (k)=k]_{k=1..n}}$. Generalizations where we multiply the entries of an ${\displaystyle n}$ by ${\displaystyle n}$ matrix (a tensor of rank 2), either ${\displaystyle [\gcd(j,k)]_{\stackrel {j=1..n}{k=1..n}}}$ or ${\displaystyle [\operatorname {lcm} (j,k)]_{\stackrel {j=1..n}{k=1..n}}}$ are considered, followed by generalizations to tensors of rank 3 and higher.

## GCD matrix generalization of the factorial

A generalization, also for nonnegative integers, of the factorial is defined as the product of all entries of an ${\displaystyle n}$ by ${\displaystyle n}$ symmetric matrix of GCDs (see the Formulae for GCD matrix generalization of the factorial section for the derivation of the second formula)

${\displaystyle a(n):=n!_{((\gcd ))}:=\prod _{j=1}^{n}\prod _{k=1}^{n}\gcd(j,k)=n!\left(\prod _{j=1}^{n}\prod _{k=1}^{j-1}\gcd(j,k)\right)^{2},\quad n\geq 0,}$

where ${\displaystyle n!_{((\gcd ))}}$ is a suggested notation (notation to be determined)[1] for this arithmetic function and ${\displaystyle \gcd(j,k)}$ is the greatest common divisor of ${\displaystyle j}$ and ${\displaystyle k}$.

A092287 Product_{j=1..n} Product_{k=1..n} GCD(j,k), n >= 0.

{1, 1, 2, 6, 96, 480, 414720, 2903040, 5945425920, 4334215495680, 277389791723520000, 3051287708958720000, 437332621360674939863040000, 5685324077688774218219520000, ...}

For example, with ${\displaystyle n}$ = 6, we have the matrix of GCDs

${\displaystyle {\begin{bmatrix}{\begin{array}{cccccc}\gcd(1,1)&\gcd(1,2)&\gcd(1,3)&\gcd(1,4)&\gcd(1,5)&\gcd(1,6)\\\gcd(2,1)&\gcd(2,2)&\gcd(2,3)&\gcd(2,4)&\gcd(2,5)&\gcd(2,6)\\\gcd(3,1)&\gcd(3,2)&\gcd(3,3)&\gcd(3,4)&\gcd(3,5)&\gcd(3,6)\\\gcd(4,1)&\gcd(4,2)&\gcd(4,3)&\gcd(4,4)&\gcd(4,5)&\gcd(4,6)\\\gcd(5,1)&\gcd(5,2)&\gcd(5,3)&\gcd(5,4)&\gcd(5,5)&\gcd(5,6)\\\gcd(6,1)&\gcd(6,2)&\gcd(6,3)&\gcd(6,4)&\gcd(6,5)&\gcd(6,6)\\\end{array}}\end{bmatrix}}={\begin{bmatrix}{\begin{array}{cccccc}1&1&1&1&1&1\\1&2&1&2&1&2\\1&1&3&1&1&3\\1&2&1&4&1&2\\1&1&1&1&5&1\\1&2&3&2&1&6\\\end{array}}\end{bmatrix}}}$

where the product of the entries of the main diagonal give ${\displaystyle 6!}$, the product of the entries of the lower-left triangular submatrix (excluding the main diagonal) give 24 (same for upper-right, the matrix being symmetric), which gives ${\displaystyle a(n)=6!\cdot (24)^{2}=414720}$.

n!_((gcd)) / n! = (A224479(n))^2
 a(0)/0! = 1 = 1^2; a(1)/1! = 1 = 1^2; a(2)/2! = 1 = 1^2; a(3)/3! = 1 = 1^2; a(4)/4! = 4 = 2^2; a(5)/5! = 4 = 2^2; a(6)/6! = 576 = 24^2; a(7)/7! = 576 = 24^2; a(8)/8! = 147456 = 384^2; a(9)/9! = 11943936 = 3456^2; a(10)/10! = 76441190400 = 276480^2; a(11)/11! = 76441190400 = 276480^2; a(12)/12! = 913008685901414400 = 955514880^2;

A224479 a(n) = product_{1 <= k <= n} product_{1 <= i < k} GCD(k,i).

{1, 1, 1, 1, 2, 2, 24, 24, 384, 3456, 276480, 276480, 955514880, 955514880, 428070666240, 866843099136000, 1775294667030528000, 1775294667030528000, ...}

Peter Bala conjectured that the order of the primes in the prime factorization of ${\displaystyle a(n)}$ is given by the formula

${\displaystyle \operatorname {ord} _{p}\ a(n)=\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left\lfloor {\frac {n}{p^{k}}}\right\rfloor ^{2}=\left\lfloor {\frac {n}{p}}\right\rfloor ^{2}+\left\lfloor {\frac {n}{p^{2}}}\right\rfloor ^{2}+\left\lfloor {\frac {n}{p^{3}}}\right\rfloor ^{2}+\cdots ,}$

for each prime ${\displaystyle p}$ up to ${\displaystyle n}$.

Charles R Greathouse IV recently proved Bala's conjecture.

Comparing this with the de Polignac–Legendre formula for the prime factorization of n! (giving the order of the primes in the prime factorization of ${\displaystyle n!}$)

${\displaystyle \operatorname {ord} _{p}\ n!=\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left\lfloor {\frac {n}{p^{k}}}\right\rfloor =\left\lfloor {\frac {n}{p}}\right\rfloor +\left\lfloor {\frac {n}{p^{2}}}\right\rfloor +\left\lfloor {\frac {n}{p^{3}}}\right\rfloor +\cdots =\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left\lfloor {\frac {n}{p^{k}}}\right\rfloor ^{1}=\left\lfloor {\frac {n}{p}}\right\rfloor ^{1}+\left\lfloor {\frac {n}{p^{2}}}\right\rfloor ^{1}+\left\lfloor {\frac {n}{p^{3}}}\right\rfloor ^{1}+\cdots ,}$

this suggests that ${\displaystyle a(n)}$ can be considered as a generalization of the factorial numbers (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle n!:=\prod _{k=1}^{n}k=\prod _{k=1}^{n}\gcd(k),\quad n\geq 0,}$

where we multiply the entries of an ${\displaystyle n}$ vector (a tensor of rank 1).

We also have (the product between braces is obviously 1 if ${\displaystyle n}$ is noncomposite)

${\displaystyle {\frac {n!_{((\gcd ))}}{n!}}=\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)^{2}{\frac {(n-1)!_{((\gcd ))}}{(n-1)!}},\quad n\geq 1.}$

### Recurrence for GCD matrix generalization of the factorial

The function obeys the recurrence equation

{\displaystyle {\begin{aligned}0!_{((\gcd ))}&:=1;\\n!_{((\gcd ))}&:=n\left(\prod _{j=1}^{n-1}\gcd(n,j)\right)\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)(n-1)!_{((\gcd ))}\\&:=n\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)^{2}(n-1)!_{((\gcd ))},\quad n\geq 1.\end{aligned}}}
n!_((gcd)) / (n-1)!_((gcd)) = n * (A051190(n))^2 n!_((gcd)) / n! = (A051190(n))^2 * (n-1)!_((gcd)) / (n-1)!
 a(1)/a(0) = 1 * 1; a(2)/a(1) = 2 * 1; a(3)/a(2) = 3 * 1; a(4)/a(3) = 4 * 4 = 4 * (2)^2; a(5)/a(4) = 5 * 1; a(6)/a(5) = 6 * 144 = 6 * (12)^2 = 6 * (2^2 * 3)^2; a(7)/a(6) = 7 * 1; a(8)/a(7) = 8 * 256 = 8 * (16)^2 = 8 * (2^4)^2; a(9)/a(8) = 9 * 81 = 9 * (9)^2 = 9 * (3^2)^2; a(10)/a(9) = 10 * 6400 = 10 * (80)^2 = 10 * (2^4 * 5)^2; a(11)/a(10) = 11 * 1; a(12)/a(11) = 12 * 11943936 = 12 * (3456)^2 = 12 * (2^7 * 3^3)^2;
 a(0)/0! = 1; a(1)/1! = 1; a(2)/2! = 1; a(3)/3! = 1; a(4)/4! = 4 = 4 * 1 = (2)^2 * 1; a(5)/5! = 4; a(6)/6! = 576 = 144 * 4 = (12)^2 * 4; a(7)/7! = 576; a(8)/8! = 147456 = 256 * 576 = (16)^2 * 576; a(9)/9! = 11943936 = 81 * 147456 = (9)^2 * 147456; a(10)/10! = 76441190400 = 6400 * 11943936 = (80)^2 * 11943936; a(11)/11! = 76441190400; a(12)/12! = 913008685901414400 = 11943936 * 76441190400 = (3456)^2 * 76441190400;

### Formulae for GCD matrix generalization of the factorial

Thus, for ${\displaystyle n\geq 1}$, we have

{\displaystyle {\begin{aligned}a(n)&=n\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)^{2}a(n-1)\\&=n(n-1)\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)^{2}\left(\prod _{k=1}^{n-2}\gcd(n-1,k)\right)^{2}a(n-2)\\&=n(n-1)\cdots (n-(n-1))\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)^{2}\left(\prod _{k=1}^{n-2}\gcd(n-1,k)\right)^{2}\cdots \left(\prod _{k=1}^{n-n}\gcd(n-(n-1),k)\right)^{2}a(n-n)\\&=n!\left\{\left(\prod _{k=1}^{n-1}\gcd(n,k)\right)\left(\prod _{k=1}^{n-2}\gcd(n-1,k)\right)\cdots \left(\prod _{k=1}^{0}\gcd(1,k)\right)\right\}^{2}\\&=n!\left(\prod _{j=1}^{n}\prod _{k=1}^{j-1}\gcd(j,k)\right)^{2},\end{aligned}}}

result which is also true for ${\displaystyle n=0}$, where we get the empty product 1.

In this formula, we can see that ${\displaystyle n!}$ corresponds to the product of the main diagonal entries of an ${\displaystyle n}$ by ${\displaystyle n}$ matrix of GCDs, while the squared expression is the product of the entries of the lower left triangular submatrix with the entries of the upper right triangular submatrix (the matrix being symmetric, we obtain the squared factor).

A051190 Product of n's GCD's with all of its predecessors (from 1 to n-1), n >= 1.

{1, 1, 1, 2, 1, 12, 1, 16, 9, 80, 1, 3456, 1, 448, 2025, 2048, 1, 186624, 1, 1024000, 35721, 11264, 1, 573308928, 625, 53248, 59049, 179830784, 1, 1007769600000, 1, 67108864, 7144929, 1114112, 37515625, 160489808068608, 1, 4980736, 89813529, ...}

## LCM matrix generalization of the factorial

A generalization, also for nonnegative integers, of the factorial is defined as the product of all entries of an ${\displaystyle n}$ by ${\displaystyle n}$ symmetric matrix of LCMs (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle a(n):=n!_{((\operatorname {lcm} ))}:=\prod _{j=1}^{n}\prod _{k=1}^{n}\operatorname {lcm} (j,k),\quad n\geq 0,}$

where ${\displaystyle n!_{((\operatorname {lcm} ))}}$ is a suggested notation (notation to be determined)[2] for this arithmetic function and ${\displaystyle \operatorname {lcm} (j,k)}$ is the least common multiple of ${\displaystyle j}$ and ${\displaystyle k}$.

A090494 Product_{j=1..n} Product_{k=1..n} LCM(j,k), n >= 0.

{1, 1, 8, 7776, 1146617856, 1289945088000000000, 46798828032806092800000000000, 2350577043461005964030008507760640000000000000, 8206262459636402163263383676462776103575725539328000000000000000, 2746781358330240881921653545637784861521126603512175621574459373964492800000000000000000, ...}

Peter Bala conjectured that the order of the primes in the prime factorization of ${\displaystyle a(n)}$ is given by the formula

${\displaystyle \operatorname {ord} _{p}\ a(n)=\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left[(2p^{k}-1)\left\lfloor {\frac {n}{p^{k}}}\right\rfloor ^{2}\right]+2\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left[\left\lfloor {\frac {n}{p^{k}}}\right\rfloor (n\mod p^{k})\right],}$

for each prime ${\displaystyle p}$ up to ${\displaystyle n}$. ( ordp(a(n),p) = sum_{k >= 1} [(2*(p^k)-1)*floor((n/(p^k)))^2] + 2*sum_{k >= 1} [floor(n/(p^k))*mod(n,p^k)] )

### Recurrence for LCM matrix generalization of the factorial

The function obeys the recurrence equation (NO, it is not like with the GCD matrix: n and n-1 in GCD arguments implies 1, while n and n-1 in LCM arguments DOES NOT imply 1!)

${\displaystyle 0!_{((\operatorname {lcm} ))}:=1;\ n!_{((\operatorname {lcm} ))}:=n\cdot \left(?\right),\quad n\geq 1.}$

### Formulae for LCM matrix generalization of the factorial

${\displaystyle n!_{((\operatorname {lcm} ))}:=n!\cdot \left(?\right),\quad n\geq 0,}$

A?????? Product of n's LCM's with all of its predecessors (from 1 to n-1), n >= 1.

{1, ...}

## GCD tensors generalizations of the factorial

### GCD rank 3 tensor generalization of the factorial

A generalization, also for nonnegative integers, of the factorial is defined as the product of all entries of an ${\displaystyle n}$ by ${\displaystyle n}$ by ${\displaystyle n}$ symmetric rank 3 tensor of GCDs (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle n!_{(((\gcd )))}:=\prod _{i=1}^{n}\prod _{j=1}^{n}\prod _{k=1}^{n}\gcd(i,j,k),\quad n\geq 0,}$

where ${\displaystyle n!_{(((\gcd )))}}$ is a suggested notation (notation to be determined)[3] for this arithmetic function and ${\displaystyle \gcd(i,j,k)}$ is the greatest common divisor of ${\displaystyle i}$, ${\displaystyle j}$ and ${\displaystyle k}$.

A129454 Product{i=1..n} Product{j=1..n} Product{k=1..n} GCD(i,j,k), n >= 0.

{1, 1, 1, 2, 6, 1536, 7680, 8806025134080, 61642175938560, 2168841254587541957294161920, 7562281854741110985626291951024209920, 1362299589723309231779453337910253309054734620740812800000000, ...}

Peter Bala conjectured that the order of the primes in the prime factorization of ${\displaystyle a(n)}$ is given by the formula

${\displaystyle \operatorname {ord} _{p}\ a(n)=\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left\lfloor {\frac {n}{p^{k}}}\right\rfloor ^{3}=\left\lfloor {\frac {n}{p}}\right\rfloor ^{3}+\left\lfloor {\frac {n}{p^{2}}}\right\rfloor ^{3}+\left\lfloor {\frac {n}{p^{3}}}\right\rfloor ^{3}+\cdots .}$

#### Recurrence for GCD rank 3 tensor generalization of the factorial

The function obeys the recurrence equation (TENTATIVE FORMULA: PLEASE VERIFY!(Verify.)[4])

{\displaystyle {\begin{aligned}0!_{(((\gcd )))}&:=1;\\n!_{(((\gcd )))}&:=n\left(\prod _{i=1}^{n-1}\prod _{j=1}^{n-1}\gcd(i,j,n)\right)\left(\prod _{i=1}^{n-1}\prod _{k=1}^{n-1}\gcd(i,n,k)\right)\left(\prod _{j=1}^{n-1}\prod _{i=1}^{n-1}\gcd(i,j,n)\right)\\&\ \ \ \ \ \ \ \left(\prod _{j=1}^{n-1}\prod _{k=1}^{n-1}\gcd(n,j,k)\right)\left(\prod _{k=1}^{n-1}\prod _{i=1}^{n-1}\gcd(i,n,k)\right)\left(\prod _{k=1}^{n-1}\prod _{j=1}^{n-1}\gcd(n,j,k)\right)(n-1)!_{(((\gcd )))}\\&\ =n\left(\prod _{j=1}^{n-1}\prod _{k=1}^{n-1}\gcd(n,j,k)\right)^{6}(n-1)!_{(((\gcd )))},\quad n\geq 1,\end{aligned}}}

where we consider the ${\displaystyle P_{2}^{3}=6}$ arrangements of any two distinct indices among ${\displaystyle i}$, ${\displaystyle j}$, ${\displaystyle k}$.

#### Formulae for GCD rank 3 tensor generalization of the factorial

${\displaystyle n!_{(((\gcd )))}=n!\left(\prod _{i=1}^{n}\prod _{j=1}^{i-1}\prod _{k=1}^{j-1}\gcd(i,j,k)\right)^{6},\quad n\geq 0.}$

### GCD rank r tensor generalization of the factorial

A further generalization, also for nonnegative integers, of the factorial is defined as the product of all entries of an ${\displaystyle n}$ by ... by ${\displaystyle n}$ (${\displaystyle r}$ times, ${\displaystyle r\geq 1}$) symmetric rank ${\displaystyle r}$ tensor of GCDs (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle n!_{(r(\gcd )r)}:=\prod _{k_{1}=1}^{n}\cdots \prod _{k_{r}=1}^{n}\gcd(k_{1},\ldots ,k_{r}),\quad n\geq 0,}$

where ${\displaystyle n!_{(r(\gcd )r)}}$ is a suggested notation (notation to be determined)[6] for this arithmetic function and ${\displaystyle \gcd(k_{1},\ldots ,k_{r})}$ is the greatest common divisor of ${\displaystyle k_{1}}$, ..., and ${\displaystyle k_{r}}$.

It seems that Peter Bala's conjecture for ranks 2 and 3 would extend to any rank ${\displaystyle r\geq 1}$, i.e.

${\displaystyle \operatorname {ord} _{p}\ a(n)=\sum _{k=1}^{\lfloor \log _{p}(n)\rfloor }\left\lfloor {\frac {n}{p^{k}}}\right\rfloor ^{r}=\left\lfloor {\frac {n}{p}}\right\rfloor ^{r}+\left\lfloor {\frac {n}{p^{2}}}\right\rfloor ^{r}+\left\lfloor {\frac {n}{p^{3}}}\right\rfloor ^{r}+\cdots .}$

#### Recurrence for GCD rank r tensor generalization of the factorial

The function obeys the recurrence equation (TENTATIVE FORMULA: PLEASE VERIFY!(Verify.)[7])

{\displaystyle {\begin{aligned}0!_{(r(\gcd )r)}&:=1;\\n!_{(r(\gcd )r)}&:=n\left(\prod _{k_{2}=1}^{n-1}\cdots \prod _{k_{r}=1}^{n-1}\gcd(n,k_{2},\ldots ,k_{r})\right)^{P_{r-1}^{r}}(n-1)!_{(r(\gcd )r)},\quad n\geq 1,\end{aligned}}}

where we consider the ${\displaystyle P_{r-1}^{r}}$ arrangements of any ${\displaystyle r-1}$ distinct indices among ${\displaystyle k_{1}}$, ..., ${\displaystyle k_{r}}$.

#### Formulae for GCD rank r tensor generalization of the factorial

${\displaystyle n!_{(r(\gcd )r)}=n!\left(\prod _{k_{1}=1}^{n}\prod _{k_{2}=1}^{k_{1}-1}\cdots \prod _{k_{\{r-1\}}=1}^{k_{\{r-2\}}-1}\ \prod _{k_{r}=1}^{k_{\{r-1\}}-1}\gcd(k_{1},\ldots ,k_{r})\right)^{P_{r-1}^{r}},\quad n\geq 0.}$

## LCM tensors generalizations of the factorial

### LCM rank 3 tensor generalization of the factorial

A generalization, also for nonnegative integers, of the factorial is defined as the product of all entries of an ${\displaystyle n}$ by ${\displaystyle n}$ by ${\displaystyle n}$ symmetric rank 3 tensor of LCMs (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle n!_{(((\operatorname {lcm} )))}:=\prod _{i=1}^{n}\prod _{j=1}^{n}\prod _{k=1}^{n}\operatorname {lcm} (i,j,k),\quad n\geq 0,}$

where ${\displaystyle n!_{(((\operatorname {lcm} )))}}$ is a suggested notation (notation to be determined)[9] for this arithmetic function and ${\displaystyle \operatorname {lcm} (i,j,k)}$ is the least common multiple of ${\displaystyle i}$, ${\displaystyle j}$ and ${\displaystyle k}$.

A?????? Product{i=1..n} Product{j=1..n} Product{k=1..n} LCM(i,j,k), n >= 0.

{1, 1, ...}

#### Recurrence for LCM rank 3 tensor generalization of the factorial

The function obeys the recurrence equation (TENTATIVE FORMULA: PLEASE VERIFY!(Verify.)[10])

{\displaystyle {\begin{aligned}0!_{(((\operatorname {lcm} )))}&:=1;\\n!_{(((\operatorname {lcm} )))}&:=n\cdot \left(?\right),\quad n\geq 1,\end{aligned}}}

#### Formulae for LCM rank 3 tensor generalization of the factorial

${\displaystyle n!_{(((\operatorname {lcm} )))}=n!\cdot \left(?\right),\quad n\geq 0.}$

### LCM rank r tensor generalization of the factorial

A further generalization, also for nonnegative integers, of the factorial is defined as the product of all entries of an ${\displaystyle n}$ by ... by ${\displaystyle n}$ (${\displaystyle r}$ times, ${\displaystyle r\geq 1}$) symmetric rank ${\displaystyle r}$ tensor of LCMs (giving the empty product 1 for ${\displaystyle n}$ = 0)

${\displaystyle n!_{(r(\operatorname {lcm} )r)}:=\prod _{k_{1}=1}^{n}\cdots \prod _{k_{r}=1}^{n}\operatorname {lcm} (k_{1},\ldots ,k_{r}),\quad n\geq 0,}$

where ${\displaystyle n!_{(r(\operatorname {lcm} )r)}}$ is a suggested notation (notation to be determined)[12] for this arithmetic function and ${\displaystyle \operatorname {lcm} (k_{1},\ldots ,k_{r})}$ is the least common multiple of ${\displaystyle k_{1}}$, ..., and ${\displaystyle k_{r}}$.

#### Recurrence for LCM rank r tensor generalization of the factorial

The function obeys the recurrence equation (TENTATIVE FORMULA: PLEASE VERIFY!(Verify.)[13])

## Notes

1. To do: notation to be determined.
2. To do: notation to be determined.
3. To do: notation to be determined.
4. Needs verification.
5. Needs verification.
6. To do: notation to be determined.
7. Needs verification.
8. Needs verification.
9. To do: notation to be determined.
10. Needs verification.
11. Needs verification.
12. To do: notation to be determined.
13. Needs verification.
14. Needs verification.