login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071650 Difference between sums of odd and even digits of n. 10
1, -2, 3, -4, 5, -6, 7, -8, 9, 1, 2, -1, 4, -3, 6, -5, 8, -7, 10, -2, -1, -4, 1, -6, 3, -8, 5, -10, 7, 3, 4, 1, 6, -1, 8, -3, 10, -5, 12, -4, -3, -6, -1, -8, 1, -10, 3, -12, 5, 5, 6, 3, 8, 1, 10, -1, 12, -3, 14, -6, -5, -8, -3, -10, -1, -12, 1, -14, 3, 7, 8, 5, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Michel Marcus, Table of n, a(n) for n = 1..10000

FORMULA

a(n) = A071649(n) - A071648(n);

a(A036301(n)) = 0.

PROG

(PARI) a(n) = {my(d=digits(n), s = 0); for (k=1, #d, if (d[k] % 2, s += d[k], s -= d[k]); ); s; } \\ Michel Marcus, Aug 05 2017

(PARI) A071650(n)=-vecsum(apply(t->(-1)^t*t, digits(n))) \\ M. F. Hasler, Dec 09 2018

CROSSREFS

Cf. A036301, A071648, A071649.

Sequence in context: A222493 A032762 A180410 * A037265 A292685 A285093

Adjacent sequences:  A071647 A071648 A071649 * A071651 A071652 A071653

KEYWORD

sign,look,base

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 17 13:33 EST 2019. Contains 329230 sequences. (Running on oeis4.)