cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A071650 Difference between sums of odd and even digits of n.

This page as a plain text file.
%I A071650 #12 Jul 27 2020 14:55:19
%S A071650 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,
%T A071650 -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,
%U A071650 1,10,-1,12,-3,14,-6,-5,-8,-3,-10,-1,-12,1,-14,3,7,8,5,10
%N A071650 Difference between sums of odd and even digits of n.
%H A071650 Michel Marcus, <a href="/A071650/b071650.txt">Table of n, a(n) for n = 1..10000</a>
%F A071650 a(n) = A071649(n) - A071648(n);
%F A071650 a(A036301(n)) = 0.
%t A071650 Table[Total[Select[IntegerDigits[n],OddQ]]-Total[Select[ IntegerDigits[ n],EvenQ]],{n,80}] (* _Harvey P. Dale_, Jul 27 2020 *)
%o A071650 (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
%o A071650 (PARI) A071650(n)=-vecsum(apply(t->(-1)^t*t,digits(n))) \\ _M. F. Hasler_, Dec 09 2018
%Y A071650 Cf. A036301, A071648, A071649.
%K A071650 sign,look,base
%O A071650 1,2
%A A071650 _Reinhard Zumkeller_, May 28 2002