OFFSET
1,1
COMMENTS
Even numbers with sum of digits equal to 18 are Harshad numbers (A005349).
If k is a term, then so is 10*k. - Robert Israel, Mar 26 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
198/18 = 11.
MAPLE
filter:= n -> convert(convert(n, base, 10), `+`) = 18:
select(filter, [seq(i, i=18...4000, 18)]); # Robert Israel, Mar 26 2023
MATHEMATICA
Select[18 * Range[100], Plus @@ IntegerDigits[#] == 18 &] (* Amiram Eldar, Sep 08 2020 *)
PROG
(PARI) isok(m) = my(s=sumdigits(m)); (s==18) && !(m%s); \\ Michel Marcus, Sep 08 2020
(PARI) first(n) = {my(res = vector(n), t = 0); forstep(i = 18, oo, 18, if(vecsum(digits(i)) == 18, t++; res[t] = i; if(t >= n, return(res) ) ) ) } \\ David A. Corneth, Sep 08 2020
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Davide Rotondo, Sep 08 2020
EXTENSIONS
More terms from Michel Marcus, Sep 08 2020
STATUS
approved