%I #23 Sep 14 2022 02:06:26
%S 2,3,5,7,84,144,160,250,343,468,735,936,975,1125,1215,1375,1408,1600,
%T 1694,1872,2401,2500,2646,2880,3920,4913,6084,6318,6860,7296,7695,
%U 8624,8704,8788,9126,10125,10240,10816,11264,12672,12675,14641,14896,16000
%N Numbers k such that the sum of distinct digits of k equals the sum of the prime divisors of k.
%C Similar to A070275, where distinctness of digits is not required.
%e 144 = 2^4*3^2 and 1+4=2+3. Thus, 144 is in this sequence.
%t Select[Range[2, 20000],Total[Union[IntegerDigits[#]]] == Total[Transpose[FactorInteger[#]][[1]]] &]
%o (Python)
%o from itertools import count, islice
%o from sympy import primefactors
%o def A356981_gen(startvalue=1): # generator of terms >= startvalue
%o return filter(lambda k:sum(int(d) for d in set(str(k)))==sum(primefactors(k)), count(max(startvalue,1)))
%o A356981_list = list(islice(A356981_gen(),30)) # _Chai Wah Wu_, Sep 12 2022
%o (PARI) isok(k) = vecsum(Set(digits(k))) == vecsum(factor(k)[, 1]); \\ _Michel Marcus_, Sep 12 2022
%Y Cf. A070275, A217928.
%K nonn,base
%O 1,1
%A _Tanya Khovanova_, Sep 09 2022
|