login
A357262
Numbers k such that the product of distinct digits of k equals the sum of the prime divisors of k.
1
2, 3, 5, 7, 126, 154, 315, 329, 342, 418, 833, 884, 1134, 1344, 1595, 1776, 1826, 1955, 2354, 4248, 4332, 5828, 7588, 7791, 9983, 14161, 15194, 16416, 21479, 22165, 23472, 25994, 26128, 27383, 33282, 42479, 42772, 43416, 43492, 44733, 45428, 51988, 55223, 61755, 72171, 72471
OFFSET
1,1
LINKS
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
Cf. A008472.
Sequence in context: A117059 A117058 A067173 * A340113 A090718 A167853
KEYWORD
nonn,base
AUTHOR
Alexandru Petrescu, Sep 21 2022
EXTENSIONS
More terms from Marius A. Burtea, Sep 21 2022
STATUS
approved