login
A085563
Sum of the prime digits of n.
5
0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 2, 2, 4, 5, 2, 7, 2, 9, 2, 2, 3, 3, 5, 6, 3, 8, 3, 10, 3, 3, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 5, 5, 7, 8, 5, 10, 5, 12, 5, 5, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 7, 7, 9, 10, 7, 12, 7, 14, 7, 7, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 0, 2, 3, 0, 5, 0, 7, 0, 0, 0, 0, 2, 3
OFFSET
1,2
LINKS
FORMULA
a(n)+A085562(n) = A007953(n). [R. J. Mathar, Aug 04 2008]
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
Sequence in context: A126436 A102394 A145091 * A071375 A269668 A061397
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Jul 05 2003
STATUS
approved