OFFSET
1,1
MATHEMATICA
Select[Rest@ Complement[#, Prime@ Range@ PrimePi@ Max@ #] &@ Range@ 230, ! CompositeQ@ Total@ IntegerDigits@ # &] (* Michael De Vlieger, Nov 15 2019 *)
Select[Range[250], CompositeQ[#]&&!CompositeQ[Total[IntegerDigits[#]]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 19 2021 *)
PROG
(PARI) lista(nn) = forcomposite(c=1, nn, my(s=sumdigits(c)); if ((s==1) || isprime(s), print1(c, ", "))); \\ Michel Marcus, Nov 15 2019
(Magma) [k:k in [2..230]| not IsPrime(k) and (IsPrime(&+Intseq(k)) or &+Intseq(k) eq 1) ]; // Marius A. Burtea, Feb 05 2020
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Ali Adams, Nov 15 2019
STATUS
approved