A384444 Positive integers k for which the sum of their digits equals the product of their prime digits.
1, 2, 3, 5, 7, 10, 20, 22, 30, 50, 70, 100, 123, 132, 200, 202, 213, 220, 231, 300, 312, 321, 500, 700, 1000, 1023, 1032, 1203, 1230, 1247, 1274, 1302, 1320, 1356, 1365, 1427, 1472, 1536, 1563, 1635, 1653, 1724, 1742, 2000, 2002, 2013, 2020, 2031, 2103, 2130, 2147
Offset: 1
Examples
1302 is a term, because 1 + 3 + 0 + 2 = 3*2 = 6.
Links
- Felix Huber, Table of n, a(n) for n = 1..10000
Programs
-
Maple
A384444:=proc(n) option remember; local k,c; if n=1 then 1 else for k from procname(n-1)+1 do c:=convert(k,'base',10); if mul(select(isprime,c))=add(c) then return k fi od fi; end proc; seq(A384444(n),n=1..51);
-
Mathematica
Select[Range[2147],Total[IntegerDigits[#]]==Times@@Select[IntegerDigits[#],PrimeQ]&] (* James C. McMahon, Jun 20 2025 *)
-
PARI
isok(k) = my(d=digits(k)); vecprod(select(isprime, d)) == vecsum(d); \\ Michel Marcus, Jun 04 2025
Comments