OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(1234567)=17 because 2+3+5+7=17.
MATHEMATICA
Table[Total[Select[IntegerDigits[n], PrimeQ]], {n, 110}] (* Harvey P. Dale, Aug 15 2020 *)
PROG
(PARI) a(n) = vecsum(select(isprime, digits(n))); \\ Michel Marcus, Feb 06 2021
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Jul 05 2003
STATUS
approved