In mathematics a harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digits when written in that base.
Example: 2023 is a harshad number because 2023 / (2+0+2+3) = 289
Assume all numbers in this problem are in 10 base
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers20
Suggested Problems
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14310 Solvers
-
Sum the numbers on the main diagonal
620 Solvers
-
07 - Common functions and indexing 4
423 Solvers
-
Deleting an element in a matrix
497 Solvers
-
800 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
This problem looks like a subset of #55035 - B-Harshad Numbers