Function Repository Resource:

InverseFactorial

Source Notebook

Compute the inverse factorial of a strictly positive integer by solving the gamma function for a specific value

Contributed by: Peter Cullen Burbery

ResourceFunction["InverseFactorial"][n]

computes the inverse factorial of the positive integer n.

Details

The input should be in the set ={1,2,3,} of natural numbers.

Examples

Basic Examples (2) 

Find the inverse factorial of 24:

In[1]:=
ResourceFunction["InverseFactorial"][24]
Out[1]=

Check the answer:

In[2]:=
4!
Out[2]=

Scope (3) 

InverseFactorial can compute results for inputs that are not factorials of integers:

In[3]:=
ResourceFunction["InverseFactorial"][25]
Out[3]=

Find the inverse factorial of 403:

In[4]:=
ResourceFunction["InverseFactorial"][403]
Out[4]=

Check the answer:

In[5]:=
FullSimplify[
 Factorial[ResourceFunction["InverseFactorial"][403]] == 403]
Out[5]=

Find the inverse factorial of 2022:

In[6]:=
ResourceFunction["InverseFactorial"][2022]
Out[6]=

Find the numerical value to 1000 digits:

In[7]:=
N[ResourceFunction["InverseFactorial"][2022], 1000]
Out[7]=

Possible Issues (2) 

The function only accepts integers:

In[8]:=
ResourceFunction["InverseFactorial"][2.71]
Out[8]=

The argument must be greater than 0:

In[9]:=
ResourceFunction["InverseFactorial"][0]
Out[9]=
In[10]:=
ResourceFunction["InverseFactorial"][-10]
Out[10]=

Publisher

Peter Burbery

Version History

  • 1.0.0 – 29 August 2022

Related Resources

License Information