login
Numbers that are not divisible by the product of their nonzero digits.
0

%I #17 Jul 28 2021 13:41:35

%S 13,14,16,17,18,19,21,22,23,25,26,27,28,29,31,32,33,34,35,37,38,39,41,

%T 42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,61,62,63,64,65,66,

%U 67,68,69,71,72,73,74,75,76,77,78,79,81,82,83,84,85,86,87

%N Numbers that are not divisible by the product of their nonzero digits.

%e The product of the nonzero digits of 42 is 4*2 = 8, which does not divide 42.

%t Select[Range[100], !Divisible[#, Times @@ Select[IntegerDigits[#], #1 > 0 &]] &] (* _Amiram Eldar_, Jul 27 2021 *)

%o (Python)

%o from math import prod

%o def ok(n): return n > 0 and n%prod([int(d) for d in str(n) if d != '0'])

%o print(list(filter(ok, range(88)))) # _Michael S. Branicky_, Jul 27 2021

%o (PARI) isok(k) = k % vecprod(select(x->(x>0), digits(k))); \\ _Michel Marcus_, Jul 28 2021

%Y Complement of A055471.

%K nonn,easy,base

%O 1,1

%A _Michael Gohn_, _Joshua Harrington_, _Sophia Lebiere_, _Hani Samamah_, _Kyla Shappell_, _Wing Hong Tony Wong_, Jul 27 2021