OFFSET
1,3
COMMENTS
If 3 divides a(n), then 9 divides a(n).
EXAMPLE
10 = 10 * (1+0);
22 = 11 * (1+1).
MATHEMATICA
m = 500; Select[Union @ Table[k * Plus @@ IntegerDigits[k], {k, 0, m}], # <= m &] (* Amiram Eldar, Sep 23 2020 *)
PROG
(PARI) is(k)={if(k==0, return(1)); fordiv(k, d, if(d*sumdigits(d)==k, return(1))); 0} \\ Andrew Howroyd, Sep 23 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Sep 23 2020
STATUS
approved