Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test whether an integer is a wasteful number
ResourceFunction["WastefulNumberQ"][n] gives True if n has fewer digits than the number of digits in its prime factorization (including exponents). |
Test whether 8 is a wasteful number:
In[1]:= | ![]() |
Out[1]= | ![]() |
Test whether 10 is a wasteful number:
In[2]:= | ![]() |
Out[2]= | ![]() |
Test multiple numbers at once:
In[3]:= | ![]() |
Out[3]= | ![]() |
Test a negative number:
In[4]:= | ![]() |
Out[4]= | ![]() |
For negative numbers, the sign is ignored:
In[5]:= | ![]() |
Out[5]= | ![]() |
Find all the wasteful numbers up to 1000 and plot them:
In[6]:= | ![]() |
Out[6]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License