|
|
A038366
|
|
n is divisible by (product of digits) + (sum of digits).
|
|
7
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Range[410], Divisible[#, Plus @@ (x = IntegerDigits[#]) + Times @@ x] &] (* Jayanta Basu, Jul 14 2013 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|