Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #40 Jan 15 2022 15:15:30
%S 4,6,8,9,95,159,195,249,326,762,973,995,998,1057,1086,1111,1189,1236,
%T 1255,1337,1338,1383,1389,1395,1419,1509,2139,2248,2623,2679,2737,
%U 2928,2949,3029,3065,3202,3344,3345,3419,3432,3437,3464,3706,3945,4344,4502
%N Multiplicative Smith numbers: Composite numbers n such that the product of nonzero digits of n = product of nonzero digits of prime factors of n.
%C They follow the same formula for Smith numbers, however, instead of addition, we have multiplication (only nonzero digits are included).
%C Trivially, prime numbers satisfy this property but are not included in the sequence.
%H T. D. Noe, <a href="/A232541/b232541.txt">Table of n, a(n) for n = 1..1000</a>
%e 1236 is a member of this sequence because 1236 = 2*2*3*103 and 1*2*3*6 = 2*2*3*1*3 (zeros are not included).
%e 998 is a member of this sequence because 998 = 2*499 and 9*9*8 = 2*4*9*9.
%t f[n_] := Times @@ DeleteCases[IntegerDigits[n], 0]; pFactors[n_] := Module[{f = FactorInteger[n]}, Flatten[ConstantArray @@@ f]]; Select[Range[2, 10000], ! PrimeQ[#] && f[#] == Times @@ f /@ pFactors[#] &] (* _T. D. Noe_, Nov 28 2013 *)
%t msnQ[n_]:=Times@@(Flatten[IntegerDigits/@Table[#[[1]],#[[2]]]&/@ FactorInteger[ n]]/.(0->1))==Times@@(IntegerDigits[n]/.(0->1)); Select[ Range[ 5000],CompositeQ[#]&&msnQ[#]&] (* _Harvey P. Dale_, Jan 15 2022 *)
%o (Python)
%o import sympy
%o from sympy import isprime
%o from sympy import factorint
%o def DigitProd(x):
%o prod = 1
%o for i in str(x):
%o if i != '0':
%o prod *= int(i)
%o return prod
%o def f(x):
%o lst = []
%o for n in range(len(list(factorint(x)))):
%o lst.append(str(list(factorint(x))[n])*list(factorint(x).values())[n])
%o string = ''
%o for i in lst:
%o string += i
%o prod = 1
%o for a in string:
%o if a != '0':
%o prod *= int(a)
%o if prod == DigitProd(x):
%o return True
%o x = 4
%o while x < 10**3:
%o if not isprime(x):
%o if f(x):
%o print(x)
%o x += 1
%o (Sage)
%o def prodPrimeDig(x):
%o F=factor(x)
%o T=[item for sublist in [[y[0]]*y[1] for y in F] for item in sublist]
%o return prod([prod(filter(lambda a: a!=0,h.digits(base=10))) for h in T])
%o n=3345 #Change n for more digits
%o [k for k in [1..n] if prod(filter(lambda a: a!=0,k.digits(base=10)))==prodPrimeDig(k) and not(is_prime(k))] # _Tom Edgar_, Nov 26 2013
%Y Cf. A006753, A051801.
%K nonn,base,easy
%O 1,1
%A _Derek Orr_, Nov 25 2013
%E Extended by _T. D. Noe_, Nov 28 2013