OFFSET
1,1
COMMENTS
If m is a term, so is 10*m.
EXAMPLE
208 = 2*104 = 8*26 is divisible by 2 and divisible by 8, 208 contains a digit 0, hence 208 is a term.
MATHEMATICA
q[n_] := MemberQ[(d = IntegerDigits[n]), 0] && AllTrue[d, # == 0 || Divisible[n, #] &]; Select[Range[1000], q] (* Amiram Eldar, Mar 25 2021 *)
PROG
(PARI) isok(m) = my(d=digits(m)); if (vecmin(d), return (0)); d = vecsort(select(x->(x > 0), d), , 8); for (k=1, #d, if (m % d[k], return(0))); return(1); \\ Michel Marcus, Mar 29 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 25 2021
STATUS
approved