cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A050689 Composites whose sum of digits equals number of its prime factors, with multiplicity.

Original entry on oeis.org

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

Views

Author

Patrick De Geest, Aug 15 1999

Keywords

Comments

The sequence is infinite because there are infinitely many primes whose sum of digits is odd (see related comment in A119450). Let p be one of them, and let k be its digital sum. Then p*10^((k-1)/2) is a term. For example, 41*10^2 is a term. - Metin Sariyar, May 30 2020

Examples

			2002 is a term since 2+0+0+2 = 4, and 2002 = 2*7*11*13 has 4 prime factors.
		

Crossrefs

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