Multifactorial

Author

Eric W. Weisstein
August 6, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SpecialFunctions/Multifactorial.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Multifactorial.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Multifactorial

V5

Product[i,{i,n,1,-k}]

V7

Product[i,{i,n,1,-k},GenerateConditions->True]

With[{k=3},Table[If[(-1+n)/k∈Integers,(-k)^((-1+n)/k) n Pochhammer[1-n/k,(-1+n)/k],$Failed],{n,10}]]

With[{k=3},Table[Product[i,{i,n,1,-k}],{n,10}]]

p=Product[i,{i,n,1,-k}]

With[{k=1},Table[(((-k))^((-1+n)/k)) n Pochhammer[1-(n/k),((-1+n)/k)],{n,10}]]

With[{k=2},Table[(((-k))^((-1+n)/k)) n Pochhammer[1-(n/k),((-1+n)/k)],{n,10}]]

With[{k=3},Table[(((-k))^((-1+n)/k)) n Pochhammer[1-(n/k),((-1+n)/k)],{n,10}]]//N

With[{k=3},Table[Product[i,{i,n,1,-k}],{n,10}]]

N[%]

FullSimplify[p,(k|n)∈Integers&&n>0&&k>0]

With[{k=1},Table[(((((-k))^((-1+n)/k)) Gamma[-(1/k)])/(Gamma[-(n/k)])),{n,10}]]

With[{k=2},Table[(((((-k))^((-1+n)/k)) Gamma[-(1/k)])/(Gamma[-(n/k)])),{n,10}]]

With[{k=3},Table[(((((-k))^((-1+n)/k)) Gamma[-(1/k)])/(Gamma[-(n/k)])),{n,10}]]//N

Factorial

(∏_i^n)i

V5

Product[i,{i,n}]

V7

Product[i,{i,n}]

Product[i,{i,n},GenerateConditions->True]

(∏_(i=1)^n)i

V7

Product[i,{i,1,n}]

Product[i,{i,1,n},GenerateConditions->True]

Product[i,{i,1,n,1}]

V5

Product[i,{i,1,n,1}]

V7

Product[i,{i,1,n,1}]

Product[i,{i,1,n,1},GenerateConditions->True]

Product[i,{i,n,1,-1}]

V5

Product[i,{i,n,1,-1}]

V7

Product[i,{i,n,1,-1}]

FullSimplify[%]

Product[i,{i,n,1,-1},GenerateConditions->True]

Double Factorial

Product[i,{i,n,1,-2}]

Table[Product[i,{i,n,1,-2}],{n,-10,10}]

Table[n!!,{n,-10,10}]

V5

Product[i,{i,n,1,-2}]

V7

Product[i,{i,n,1,-2}]

Product[i,{i,n,1,-2},GenerateConditions->True]

Product[i,{i,1,n,2}]

V5

Product[i,{i,1,n,2}]

V7

Product[i,{i,1,n,2}]

Product[i,{i,1,n,2},GenerateConditions->True]

Product[-2 i+n,{i,0,(1/2) (-1+n)},Assumptions->!((1/2) (-1+n)∈Integers&&n≥1)]

FullSimplify[(((2^((1+n)/2)) Gamma[1+(n/2)])/(Sqrt[π]))-n!!,Mod[n,2]==1]

FullSimplify[(((2^((1+n)/2)) Gamma[1+(n/2)])/(Sqrt[π]))-n!!,Mod[n,2]==0]

Triple Factorial

Product[i,{i,n,1,-3}]

V7

Product[i, {i, n, 1, -3}]

Product[i, {i, n, 1, -3},GenerateConditions->True]

Product[i, {i, n, 1, -3},Assumptions->Mod[n,3]==0]

Product[i, {i, n, 3, -3},Assumptions->Mod[n,3]==0]

Product[i, {i, n, 1, -3},Assumptions->Mod[n,3]==1]

Product[i, {i, n, 1, -3},Assumptions->Mod[n,3]==2]

Product[i, {i, n, 2, -3},Assumptions->Mod[n,3]==2]

Factorial3[n_]:=Piecewise[{
{(((-3))^((1/3) (-3+n))) n Pochhammer[1-(n/3),(1/3) (-3+n)],Mod[n,3]==0},
{(((-3))^((1/3) (-1+n))) n Pochhammer[1-(n/3),(1/3) (-1+n)],Mod[n,3]==1},
{(((-3))^((1/3) (-2+n))) n Pochhammer[1-(n/3),(1/3) (-2+n)],Mod[n,3]==2}}]

FullSimplify[Factorial3[n],n∈Integers&&n>0]

Table[Factorial3[n],{n,10}]

Table[Product[i,{i,n,1,-3}],{n,10}]

Product[i,{i,1,n,3}]

V7

Product[i, {i, 1, n, 3}]

Product[i, {i, 1, n, 3},GenerateConditions->True]

Product[i, {i, 1, n, 3},Assumptions->Mod[n,3]==1]

Product[i, {i, 1, n, 3},Assumptions->Mod[n,3]==2]

Product[i, {i, 1, n, 3},Assumptions->(1/3) (-2+n)∈Integers&&n≥1]

Function

This needs work

Multifactorial[n_,k_]:=Times@@Range[n,1,-k]

Multifactorial2[n_,k_]:=Module[{i},
If[GCD[k,n]==1,
Times@@Table[n-i k,{i,0,Floor[n/k-1]}],
Times@@Table[i k,{i,Floor[n/k]}]
]
]

Product[n-i k,{i,0,Floor[n/k]}]

Product[i k,{i,Floor[n/k]}]

Multifactorial3[n_,k_]:=Module[{i,r=n/k},
If[GCD[k,n]==1,
(((-k))^(1+Floor[r]))Pochhammer[-r,1+Floor[r]],
(k^(Floor[r]))Floor[r]!
]
]

Factorial

Table[n!,{n,0,10}]

Table[Multifactorial[n,1],{n,0,10}]

Table[Multifactorial2[n,1],{n,0,10}]

Table[Multifactorial3[n,1],{n,0,10}]

Double

Table[n!!,{n,0,10}]

Table[Multifactorial[n,2],{n,0,10}]

Table[Multifactorial2[n,2],{n,0,10}]

Table[Multifactorial3[n,2],{n,0,10}]

Triple

Table[Multifactorial[n,3],{n,0,10}]

Table[Multifactorial2[n,3],{n,0,10}]

Table[Multifactorial3[n,3],{n,0,10}]

Quadruple

Table[Multifactorial[n,4],{n,0,10}]

Table[Multifactorial2[n,4],{n,0,10}]

Table[Multifactorial3[n,4],{n,0,10}]