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!)
A304439 Add to n the sum of its odd digits minus the sum of its even digits. 5
0, 2, 0, 6, 0, 10, 0, 14, 0, 18, 11, 13, 11, 17, 11, 21, 11, 25, 11, 29, 18, 20, 18, 24, 18, 28, 18, 32, 18, 36, 33, 35, 33, 39, 33, 43, 33, 47, 33, 51, 36, 38, 36, 42, 36, 46, 36, 50, 36, 54, 55, 57, 55, 61, 55, 65, 55, 69, 55, 73, 54, 56, 54, 60, 54, 64, 54, 68, 54, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Subsequence A036301 lists fixed points of this map, the first nontrivial one being 112. It is a subsequence of A124176 (and A124177) which considers iterations of this map, more precisely, numbers which are in a cyclic orbit for iterations of this map.
LINKS
FORMULA
a(n) = n + A071650(n).
MATHEMATICA
soded[n_]:=Module[{idn=IntegerDigits[n]}, n+Total[Select[idn, OddQ]]-Total[ Select[idn, EvenQ]]]; Array[soded, 70, 0] (* Harvey P. Dale, Aug 12 2021 *)
PROG
(PARI) A304439(n)=n-vecsum(apply(t->t*(-1)^t, digits(n)))
CROSSREFS
Sequence in context: A019781 A335959 A167294 * A266537 A328337 A285782
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, May 18 2018
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 July 30 09:37 EDT 2024. Contains 374740 sequences. (Running on oeis4.)