A354081 Positive integers k such that the first digit of k is divisible by the product of all the remaining digits of k.
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 22, 31, 33, 41, 42, 44, 51, 55, 61, 62, 63, 66, 71, 77, 81, 82, 84, 88, 91, 93, 99, 111, 211, 212, 221, 311, 313, 331, 411, 412, 414, 421, 422, 441, 511, 515, 551, 611, 612, 613, 616, 621, 623, 631, 632, 661, 711, 717, 771
Offset: 1
Examples
9331 is a term: the first digit is 9, which is divisible by the product of the remaining digits, i.e., 3*3*1 = 9. 8448 is not a term: the first digit is 8, which is not divisible by the product of the remaining digits, i.e., 4*4*8 = 128.
Crossrefs
Subsequence of A052382.
Programs
-
Mathematica
Select[Range[1000], !MemberQ[d = IntegerDigits[#], 0] && Divisible[First[d], Times @@ Rest[d]] &] (* Amiram Eldar, Jun 09 2022 *)
-
PARI
isok(k) = my(d=digits(k), p=vecprod(d)); p && ((d[1] % (p/d[1])) == 0); \\ Michel Marcus, Jun 06 2022
-
Python
from math import prod def ok(n): d = list(map(int, str(n))) return 0 not in d and int(d[0])%prod(d[1:]) == 0 print([k for k in range(800) if ok(k)]) # Michael S. Branicky, Jun 09 2022