login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071648 Sum of even decimal digits of n. 9
0, 2, 0, 4, 0, 6, 0, 8, 0, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 2, 2, 4, 2, 6, 2, 8, 2, 10, 2, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 4, 4, 6, 4, 8, 4, 10, 4, 12, 4, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 6, 6, 8, 6, 10, 6, 12, 6, 14, 6, 0, 0, 2, 0, 4, 0, 6, 0, 8, 0, 8, 8, 10, 8, 12, 8, 14, 8, 16, 8, 0, 0, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A007953(n) - A071649(n). (Corrected by M. F. Hasler, Dec 09 2018)
MATHEMATICA
Array[Total@ Select[IntegerDigits@ #, EvenQ] &, 101] (* Michael De Vlieger, Dec 09 2018 *)
PROG
(PARI) a(n)=my(d=digits(n)); sum(i=1, #d, if(d[i]%2, , d[i])) \\ Charles R Greathouse IV, Apr 04 2014
(PARI) A071648(n)=vecsum(select(d->!bittest(d, 0), digits(n))) \\ Nearly twice as fast. - M. F. Hasler, Dec 09 2018
CROSSREFS
Sequence in context: A166260 A319813 A366562 * A001613 A237420 A130891
KEYWORD
nonn,base,easy
AUTHOR
Reinhard Zumkeller, May 28 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)