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.

A304440 Add to n the sum of its even digits minus the sum of its odd digits.

This page as a plain text file.
%I A304440 #11 Dec 26 2023 13:46:05
%S A304440 0,0,4,0,8,0,12,0,16,0,9,9,13,9,17,9,21,9,25,9,22,22,26,22,30,22,34,
%T A304440 22,38,22,27,27,31,27,35,27,39,27,43,27,44,44,48,44,52,44,56,44,60,44,
%U A304440 45,45,49,45,53,45,57,45,61,45,66,66,70,66,74,66,78,66,82,66,63
%N A304440 Add to n the sum of its even digits minus the sum of its odd digits.
%C A304440 A036301 lists fixed points of this map, the first nonzero one being 112. It is also a subsequence of A124177 (and A124176) which lists numbers which are in a cyclic orbit under iterations of this map.
%F A304440 a(n) = n - A071650(n).
%t A304440 nseo[n_]:=Module[{idn=IntegerDigits[n]},n+Total[Select[idn,EvenQ]]-Total[Select[idn,OddQ]]]; Array[nseo,80,0] (* _Harvey P. Dale_, Dec 26 2023 *)
%o A304440 (PARI) A304440(n)=n+vecsum(apply(t->t*(-1)^t,digits(n)))
%Y A304440 Cf. A304439 (variant: + even - odd digits), A071650 (odd - even digits), A071648, A071649, A036301 (fixed points), A124177, A124176.
%K A304440 nonn,base
%O A304440 0,3
%A A304440 _M. F. Hasler_, May 18 2018