A050689 Composites whose sum of digits equals number of its prime factors, with multiplicity.
12, 30, 32, 40, 102, 220, 240, 500, 600, 1002, 1012, 1104, 1152, 1210, 1320, 1500, 2001, 2002, 2020, 2040, 2120, 2240, 2300, 3010, 3040, 3300, 4032, 4100, 4320, 5100, 5200, 6400, 7000, 7200, 10001, 10002, 10011, 10030, 10040, 10080, 10140, 10220, 10304, 10800
Offset: 1
Examples
2002 is a term since 2+0+0+2 = 4, and 2002 = 2*7*11*13 has 4 prime factors.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 322 terms from Michael Turniansky)
Programs
-
Mathematica
Select[Range[10300],!PrimeQ[#]&&PrimeOmega[#]==Total[IntegerDigits[#]]&] (* Jayanta Basu, May 30 2013 *)
-
PARI
isok(n) = sumdigits(n) == bigomega(n); \\ Michel Marcus, Feb 13 2017
-
Python
from sympy import factorint def ok(n): return 1 < sum(map(int, str(n))) == sum(factorint(n).values()) print([k for k in range(11000) if ok(k)]) # Michael S. Branicky, Dec 30 2021
Comments