Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the prime factorization of an integer and return it in an inactivated form
ResourceFunction["InactiveFactorInteger"][n] returns the prime factorization of n in an inactivated form. |
Factor an integer:
| In[1]:= |
| Out[1]= |
The head of this result is Inactive[Times]:
| In[2]:= |
| Out[2]= |
Applying Activate returns the original integer:
| In[3]:= |
| Out[3]= |
By holding it's input unevaluated, InactiveFactorInteger can factorize certain explicit powers efficiently:
| In[4]:= |
| Out[4]= |
Evaluating and then factoring the power, is significantly slower:
| In[5]:= |
| Out[5]= |
This work is licensed under a Creative Commons Attribution 4.0 International License