cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A308472 Numbers that are divisible by the sum of the digits of the product of their digits.

This page as a plain text file.
%I A308472 #26 May 22 2025 10:21:48
%S A308472 1,2,3,4,5,6,7,8,9,11,12,15,24,25,28,36,52,54,63,99,111,112,115,125,
%T A308472 126,132,138,152,154,156,162,165,168,182,187,189,198,212,215,216,224,
%U A308472 234,251,252,255,261,264,276,279,297,312,318,324,333,342,354,369,372,396,432,441
%N A308472 Numbers that are divisible by the sum of the digits of the product of their digits.
%C A308472 All terms are zeroless (A052382).
%H A308472 David Consiglio, Jr., <a href="/A308472/b308472.txt">Table of n, a(n) for n = 1..6253</a>
%e A308472 2771 is a term of this sequence because 2*7*7*1 = 98 --> 9 + 8 = 17 --> 2771 / 17 = 163.
%p A308472 d:= n-> convert(n, base, 10):
%p A308472 q:= n-> (m-> m>0 and irem(n, add(j, j=d(m)))=0)(mul(i, i=d(n))):
%p A308472 select(q, [$1..500])[];  # _Alois P. Heinz_, May 29 2019
%t A308472 Select[Range[500],DigitCount[#,10,0]==0&&Divisible[#,Total[ IntegerDigits[ Times@@IntegerDigits[#]]]]&] (* _Harvey P. Dale_, Jan 24 2021 *)
%o A308472 (Python)
%o A308472 def dprod(n):
%o A308472     x = str(n)
%o A308472     start = 1
%o A308472     for q in x:
%o A308472         start *= int(q)
%o A308472     return start
%o A308472 def dsum(n):
%o A308472     x = str(n)
%o A308472     start = 0
%o A308472     for q in x:
%o A308472         start += int(q)
%o A308472     return start
%o A308472 seq_1 = [n for n in range(1,10000) if dprod(n) != 0 and n % (dsum(dprod(n))) == 0]
%o A308472 print(seq_1)
%o A308472 (PARI) spd(n) = my(d=digits(n)); sumdigits(vecprod(d)); \\ A128212
%o A308472 isok(n) = my(p=spd(n)); p && (n % p == 0); \\ _Michel Marcus_, May 29 2019
%o A308472 (Magma) [n:n in [1..450]| not 0 in Intseq(n) and IsIntegral(n/(&+Intseq((&*(Intseq(n))))))]; // _Marius A. Burtea_, May 31 2019
%Y A308472 Cf. A007602, A052382, A128212.
%K A308472 nonn,base
%O A308472 1,2
%A A308472 _David Consiglio, Jr._, May 29 2019