A038366 n is divisible by (product of digits) + (sum of digits).
10, 19, 20, 29, 30, 39, 40, 42, 49, 50, 59, 60, 69, 70, 79, 80, 89, 90, 99, 100, 102, 108, 110, 120, 126, 132, 140, 150, 180, 190, 200, 201, 204, 207, 209, 210, 220, 230, 240, 270, 280, 285, 300, 306, 308, 312, 320, 330, 360, 370, 400, 402, 405, 407, 408, 410
Offset: 1
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[410], Divisible[#, Plus @@ (x = IntegerDigits[#]) + Times @@ x] &] (* Jayanta Basu, Jul 14 2013 *)
-
PARI
isok(m) = my(d=digits(m)); (m % (vecprod(d) + vecsum(d))) == 0; \\ Michel Marcus, Oct 29 2019
-
Python
from math import prod def ok(n): d = list(map(int, str(n))); return n and n%(sum(d)+prod(d)) == 0 print([k for k in range(411) if ok(k)]) # Michael S. Branicky, Oct 19 2021