login
A141642
Composite numbers whose sum of digits is a prime.
3
12, 14, 16, 20, 21, 25, 30, 32, 34, 38, 49, 50, 52, 56, 58, 65, 70, 74, 76, 85, 92, 94, 98, 102, 104, 106, 110, 111, 115, 119, 120, 122, 124, 128, 133, 140, 142, 146, 148, 155, 160, 164, 166, 175, 182, 184, 188, 200, 201, 203, 205, 209, 210, 212, 214, 218, 221, 230, 232, 236
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[300], CompositeQ[#]&&PrimeQ[Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Feb 19 2018 *)
PROG
(Python)
from sympy import isprime
def ok(n): return isprime(sum(map(int, str(n)))) and not isprime(n)
print([k for k in range(237) if ok(k)]) # Michael S. Branicky, Dec 14 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
More terms from N. J. A. Sloane, Sep 03 2008
STATUS
approved