OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
329 = 7*47. 3*2*9 = 7+47. Thus 329 is a term.
MAPLE
filter:= proc(n) convert(convert(convert(n, base, 10), set), `*`) = convert(numtheory:-factorset(n), `+`) end proc:
select(filter, [$1..10^5]); # Robert Israel, Sep 22 2023
MATHEMATICA
Select[Range[2, 10^5], !MemberQ[(d = IntegerDigits[#]), 0] && Times @@ Union[d] == Plus @@ FactorInteger[#][[;; , 1]] &] (* Amiram Eldar, Sep 21 2022 *)
PROG
(PARI) isok(k) = vecprod(Set(digits(k))) == vecsum(factor(k)[, 1]);
(Python)
from math import prod
from sympy import primefactors
def ok(n): return n and prod(map(int, set(str(n)))) == sum(primefactors(n))
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Sep 21 2022
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Alexandru Petrescu, Sep 21 2022
EXTENSIONS
More terms from Marius A. Burtea, Sep 21 2022
STATUS
approved