OFFSET
1,1
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
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 322 terms from Michael Turniansky)
EXAMPLE
2002 is a term since 2+0+0+2 = 4, and 2002 = 2*7*11*13 has 4 prime factors.
MATHEMATICA
Select[Range[10300], !PrimeQ[#]&&PrimeOmega[#]==Total[IntegerDigits[#]]&] (* Jayanta Basu, May 30 2013 *)
PROG
(APL (NARS200 dialect)) ⍸∊{(⍴π⍵)=+/(10⍴10)⊤⍵}¨⍳1E6 ⍝for the numbers through 1000000 Michael Turniansky Feb 13 2017
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Aug 15 1999
STATUS
approved