Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evaluate the multifactorial function
| ResourceFunction["MultiFactorial"][n,k] gives the kth multifactorial of n. | 
Integer values:
| In[1]:= | ![Table[ResourceFunction["MultiFactorial"][n, 3], {n, 10}]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/7892691eecea48c1.png) | 
| Out[1]= |  | 
| In[2]:= | ![ResourceFunction["MultiFactorial"][50, 4]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/13fe93919cb2563c.png) | 
| Out[2]= |  | 
Evaluate numerically:
| In[3]:= | ![ResourceFunction["MultiFactorial"][5.5, 4]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/2c7eacb26c931841.png) | 
| Out[3]= |  | 
Evaluate for large arguments:
| In[4]:= | ![ResourceFunction["MultiFactorial"][10000, 3] // Short](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/19b988f61443b043.png) | 
| Out[4]= |  | 
| In[5]:= | ![N[%]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/398fec320862ee67.png) | 
| Out[5]= |  | 
Evaluate at negative integers:
| In[6]:= | ![Table[ResourceFunction["MultiFactorial"][-n, 5], {n, 7}]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/0797d03d13b43c21.png) | 
| Out[6]= |  | 
Evaluate for complex arguments:
| In[7]:= | ![ResourceFunction["MultiFactorial"][-0.1 + 0.2 I, 3]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/2b01e2d57fc0c1aa.png) | 
| Out[7]= |  | 
MultiFactorial threads elementwise over lists:
| In[8]:= | ![ResourceFunction["MultiFactorial"][{2, 3, 5, 7}, 4]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/7f4d47d6798fb768.png) | 
| Out[8]= |  | 
MultiFactorial[n,1] is equivalent to Factorial[n] (n!):
| In[9]:= | ![Table[ResourceFunction["MultiFactorial"][n, 1] == n!, {n, 7}]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/43060c8102d21b0d.png) | 
| Out[9]= |  | 
MultiFactorial[n,2] is equivalent to Factorial2[n] (n!!):
| In[10]:= | ![Table[ResourceFunction["MultiFactorial"][n, 2] == n!!, {n, 7}]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/3f15cae60f8dee94.png) | 
| Out[10]= |  | 
Large arguments can give results too large to be computed explicitly, even approximately:
| In[11]:= | ![ResourceFunction["MultiFactorial"][10.^13, 4]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/0e48d69f12aef790.png) | 
| Out[11]= |  | 
Machine-number inputs can give arbitrary‐precision results:
| In[12]:= | ![ResourceFunction["MultiFactorial"][10.^6, 5]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/41c1dcf60a34f5b2.png) | 
| Out[12]= |  | 
| In[13]:= | ![MachineNumberQ[%]](https://www.wolframcloud.com/obj/resourcesystem/images/ac9/ac91eaa4-574f-4f02-a825-238ff8ba6161/3de7d688d8ea89f9.png) | 
| Out[13]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License