OFFSET
0,4
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MATHEMATICA
A107128[n_]:=FromDigits[Map[If[Mod[ #, 2]==0, #/2, # ]&, IntegerDigits[n]]]
Table[FromDigits[If[EvenQ[#], #/2, #]&/@IntegerDigits[n]], {n, 0, 80}] (* Harvey P. Dale, Sep 03 2018 *)
PROG
(Haskell)
a107128 n = if n == 0 then 0 else 10 * (a107128 n') + m * d + (1 - m) * d'
where (d', m) = divMod d 2
(n', d) = divMod n 10
-- Reinhard Zumkeller, Jan 14 2015
(Python)
def A107128(n): return int(str(n).translate({50:49, 52:50, 54:51, 56:52})) # Chai Wah Wu, Apr 08 2022
CROSSREFS
KEYWORD
AUTHOR
Zak Seidov, May 12 2005
STATUS
approved