A111948 Admirable Harshad numbers n such that the subtracted divisor is equal to the digital sum of n.
24, 42, 114, 222, 402, 2022, 2202, 7588, 8596, 10014, 11202, 12102, 17668, 21102, 27748, 29764, 31002, 32788, 39844, 42868, 43876, 45388, 46396, 48916, 49924, 55972, 56476, 57484, 58492, 65548, 66556, 69076, 70588, 71596, 78148, 81676
Offset: 1
Examples
a(2)=42 because 1+2+3+7+14+21-6 = 42 and 42/6 = 7.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
harsQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; admQ[n_] := (ab = DivisorSigma[1, n] - 2 n) > 0 && EvenQ[ab] && Plus @@ IntegerDigits[n] == ab/2 && ab/2 < n && Divisible[n, ab/2]; Select[Range[100000], harsQ[#] && admQ[#] &] (* Amiram Eldar, Oct 27 2019 *)