Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Dec 26 2023 13:46:05
%S 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 22,38,22,27,27,31,27,35,27,39,27,43,27,44,44,48,44,52,44,56,44,60,44,
%U 45,45,49,45,53,45,57,45,61,45,66,66,70,66,74,66,78,66,82,66,63
%N Add to n the sum of its even digits minus the sum of its odd digits.
%C 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 a(n) = n - A071650(n).
%t 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 (PARI) A304440(n)=n+vecsum(apply(t->t*(-1)^t,digits(n)))
%Y Cf. A304439 (variant: + even - odd digits), A071650 (odd - even digits), A071648, A071649, A036301 (fixed points), A124177, A124176.
%K nonn,base
%O 0,3
%A _M. F. Hasler_, May 18 2018