Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test if a number is a harshad number
Test if 2023 is a harshad number:
In[1]:= |
Out[1]= |
Test another number:
In[2]:= |
Out[2]= |
Test a list of numbers:
In[3]:= |
Out[3]= |
Give the base explicitly:
In[4]:= |
Out[4]= |
Use a different base:
In[5]:= |
Out[5]= |
Base 0 cannot be computed:
In[6]:= |
Out[6]= |
Base 1 cannot be computed:
In[7]:= |
Out[7]= |
The number 0 cannot be divided by itself:
In[8]:= |
Out[8]= |
12 is a harshad number in multiple bases:
In[9]:= |
Out[9]= |
12 is not an 8-harshad number:
In[10]:= |
Out[10]= |
The number 2016502858579884466176 is a multiple harshad number:
In[11]:= |
Out[11]= |
In[12]:= |
Out[12]= |
Find the first 1000 harshad numbers and visualize them:
In[13]:= |
Out[14]= |
All numbers up to 10000 are either a harshad number or the sum of two harshad numbers:
In[15]:= |
Out[17]= |
The first factorial that is not a harshad number is 432:
In[18]:= |
Out[18]= |
This work is licensed under a Creative Commons Attribution 4.0 International License