%I #30 Sep 23 2023 12:11:30
%S 2,3,5,7,126,154,315,329,342,418,833,884,1134,1344,1595,1776,1826,
%T 1955,2354,4248,4332,5828,7588,7791,9983,14161,15194,16416,21479,
%U 22165,23472,25994,26128,27383,33282,42479,42772,43416,43492,44733,45428,51988,55223,61755,72171,72471
%N Numbers k such that the product of distinct digits of k equals the sum of the prime divisors of k.
%H Robert Israel, <a href="/A357262/b357262.txt">Table of n, a(n) for n = 1..1000</a>
%e 329 = 7*47. 3*2*9 = 7+47. Thus 329 is a term.
%p filter:= proc(n) convert(convert(convert(n,base,10),set),`*`) = convert(numtheory:-factorset(n),`+`) end proc:
%p select(filter, [$1..10^5]); # _Robert Israel_, Sep 22 2023
%t Select[Range[2, 10^5], !MemberQ[(d = IntegerDigits[#]), 0] && Times @@ Union[d] == Plus @@ FactorInteger[#][[;;,1]] &] (* _Amiram Eldar_, Sep 21 2022 *)
%o (PARI) isok(k) = vecprod(Set(digits(k))) == vecsum(factor(k)[, 1]);
%o (Python)
%o from math import prod
%o from sympy import primefactors
%o def ok(n): return n and prod(map(int, set(str(n)))) == sum(primefactors(n))
%o print([k for k in range(10**5) if ok(k)]) # _Michael S. Branicky_, Sep 21 2022
%o (Magma) sp:=func<n|&+PrimeDivisors(n)>; [n:n in [2..80000]|sp(n) eq &*[c:c in Set(Intseq(n))]]; // _Marius A. Burtea_, Sep 21 2022
%Y Cf. A008472.
%K nonn,base
%O 1,1
%A _Alexandru Petrescu_, Sep 21 2022
%E More terms from _Marius A. Burtea_, Sep 21 2022