A382402 Numbers divisible by the product of their digits (mod 10).
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 24, 26, 34, 35, 37, 48, 55, 62, 64, 66, 72, 73, 75, 76, 78, 84, 88, 95, 96, 98, 99, 111, 112, 115, 126, 132, 134, 135, 136, 137, 144, 148, 155, 162, 164, 168, 172, 173, 175, 176, 184, 188, 192, 195, 196, 198, 199, 212, 216, 228, 232, 244, 248, 264, 266
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
filter:= proc(n) local L,t; L:= convert(n,base,10); t:= convert(L,`*`) mod 10; t > 0 and n mod t = 0 end proc: select(filter, [$1..1000]); # Robert Israel, Jun 01 2025
-
Mathematica
Select[Range[300], (prod = Mod[Times @@ IntegerDigits[#], 10]) > 0 && Divisible[#, prod] &] (* Amiram Eldar, Mar 23 2025 *)
-
PARI
isok(k) = my(p=lift(vecprod(apply(x->Mod(x, 10), digits(k))))); if (p, !(k % p)); \\ Michel Marcus, Mar 31 2025
-
Python
from math import prod def ok(n): return (p:=prod(map(int, str(n)))%10) > 0 and n%p == 0 print([k for k in range(300) if ok(k)]) # Michael S. Branicky, Mar 23 2025
Comments