login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A085562
Sum of the nonprime digits of n.
4
1, 0, 0, 4, 0, 6, 0, 8, 9, 1, 2, 1, 1, 5, 1, 7, 1, 9, 10, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 4, 5, 4, 4, 8, 4, 10, 4, 12, 13, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 6, 7, 6, 6, 10, 6, 12, 6, 14, 15, 0, 1, 0, 0, 4, 0, 6, 0, 8, 9, 8, 9, 8, 8, 12, 8, 14, 8, 16, 17, 9, 10, 9, 9, 13, 9, 15, 9
OFFSET
1,4
LINKS
EXAMPLE
a(123456)=11 because 1+4+6=11.
MATHEMATICA
Array[Total[DeleteCases[IntegerDigits[#], _?PrimeQ]]&, 100] (* Harvey P. Dale, Apr 03 2016 *)
PROG
(PARI) a(n) = vecsum(select(x->(!isprime(x)), digits(n))); \\ Michel Marcus, Feb 06 2021
CROSSREFS
Sequence in context: A339873 A055672 A327964 * A037282 A191558 A075083
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Jul 05 2003
STATUS
approved