login
A342855
Numbers that contain a digit 0 (A011540) and that are divisible by their nonzero digits (A002796).
0
10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 104, 105, 110, 120, 140, 150, 200, 202, 204, 208, 210, 220, 240, 250, 280, 300, 303, 306, 330, 360, 400, 404, 408, 420, 440, 480, 500, 505, 510, 520, 540, 550, 600, 606, 630, 660, 700, 707, 770, 800, 808, 840, 880, 900, 909, 990, 1000
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
Intersection of A002796 and A011540.
Sequence in context: A057169 A330562 A328783 * A201014 A096092 A109597
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 25 2021
STATUS
approved