OFFSET
1,2
COMMENTS
These numbers are also called MHN-2 or Multiple Harshad Numbers-2.
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10796 (all a(n) <= 10^6)
Wikipedia, Harshad Number
EXAMPLE
486 is a MHN as it is divisible by the sum of its digits i.e. 18. The quotient obtained, 27, is also divisible by the sum of its digits, i.e. 9.
MATHEMATICA
mhnQ[n_]:=Module[{s=Total[IntegerDigits[n]]}, Divisible[n, s]&&Divisible[ n/s, Total[IntegerDigits[n/s]]]]; Select[Range[800], mhnQ] (* Harvey P. Dale, Sep 02 2017 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Mihir Mathur, Jan 14 2014
STATUS
approved