login
A106747
Replace each odd digit d of n with (d-1)/2 and each even digit d with d/2.
3
0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 30, 30, 31, 31, 32, 32
OFFSET
0,5
COMMENTS
Terms are repeated. Differs from A004526 and A021895 starting with a(11)=0, A004526(11)=A021895(11)=5.
LINKS
MATHEMATICA
a[n_]:=FromDigits[Map[If[Mod[ #, 2]==1, (#-1)/2, #/2]&, IntegerDigits[n]]]; Table[a[n], {n, 0, 100}]
PROG
(Haskell)
a106747 n = if n == 0 then 0 else 10 * (a106747 n') + div d 2
where (n', d) = divMod n 10
-- Reinhard Zumkeller, Jan 14 2015
(Python)
def A106747(n): return int(str(n).translate({49:48, 50:49, 51:49, 52:50, 53:50, 54:51, 55:51, 56:52, 57:52})) # Chai Wah Wu, Apr 07 2022
CROSSREFS
KEYWORD
nonn,base,look
AUTHOR
Zak Seidov, May 12 2005
STATUS
approved