Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the largest prime factor of a given integer
ResourceFunction["LargestPrimeFactor"][x] finds the largest prime factor of an integer x. |
Find the largest prime factor of a number:
| In[1]:= |
| Out[1]= |
For non-numeric input, LargestPrimeFactor remains unevaluated:
| In[2]:= |
| Out[2]= |
LargestPrimeFactor accepts any integer, including negatives and zero:
| In[3]:= |
| Out[3]= |
| In[4]:= |
| Out[4]= |
Non-integer numeric input triggers a message:
| In[5]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License