Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the multiplicative persistence, in any base, of an integer
ResourceFunction["MultiplicativePersistence"][n,b] gives the multiplicative persistence of the non-negative integer n when expressed in the base b. | |
ResourceFunction["MultiplicativePersistence"][n] gives the base-10 muliplicative persistence of n. |
Compute the multiplicative persistence of 14691:
| In[1]:= |
| Out[1]= |
Compute the multiplicative persistence of 14691, base-14:
| In[2]:= |
| Out[2]= |
MultiplicativePersistence threads elementwise over lists:
| In[3]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
Compute the multiplicative persistence of the first 100 integers (OEIS A031346):
| In[6]:= |
| Out[6]= |
The result returned by MultiplicativePersistence can be iteratively computed using NestWhileList:
| In[7]:= | ![]() |
| Out[7]= |
The single-digit integer that marks the end of the digit multiplication process is called the multiplicative digital root and is returned by the resource function MultiplicativeDigitalRoot:
| In[8]:= |
| Out[8]= |
| In[9]:= |
| Out[9]= |
| In[10]:= |
| Out[10]= |
The additive analogue of multiplicative persistence is called additive persistence and is returned by the resource function AdditivePersistence:
| In[11]:= |
| Out[11]= |
| In[12]:= |
| Out[12]= |
| In[13]:= |
| Out[13]= |
MultiplicativePersistence requires its input to be non-negative:
| In[14]:= |
| Out[14]= |
The smallest integers with multiplicative persistences equal to 0,1,2,3,4,… (OEIS A003001) are:
| In[15]:= |
| Out[15]= |
It is known that there is no number N<10233 with multiplicative persistence larger than 11 (Carmody 2001).
This work is licensed under a Creative Commons Attribution 4.0 International License