[go: up one dir, main page]

login
A188642
Characteristic function of numbers that are divisible by the product of their digits.
6
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0
OFFSET
0
COMMENTS
a(A007602(n)) = a(A038186(n)) = 1; a(A188643(n)) = 0.
MAPLE
isA007602 := proc(n) if A007954(n) = 0 then false; else `if`(n mod A007954(n) = 0, true, false) ; end if; end proc:
A188642 := proc(n) if isA007602(n) then 1; else 0 ; end if ; end proc:
seq(A188642(n), n=0..30) ; # R. J. Mathar, Apr 08 2011
MATHEMATICA
dpdQ[n_]:=Module[{idn=IntegerDigits[n]}, FreeQ[idn, 0]&&Mod[n, Times@@idn]==0]; Table[ If[dpdQ[n], 1, 0], {n, 0, 120}] (* Harvey P. Dale, May 06 2023 *)
PROG
(Haskell)
a188642 n
| a168046 n == 1 = 1 - signum (n `mod` a007954 n)
| otherwise = 0
a188642_list = map a188642 [0..]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Apr 07 2011
STATUS
approved