(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*4^i} is base 4 representation of n and e(i) are digits d(i) in nondecreasing order.

A037881

(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*4^i} is base 4 representation of n and e(i) are digits d(i) in nondecreasing order.

Terms

    a(0) =0a(1) =0a(2) =0a(3) =0a(4) =0a(5) =1a(6) =2a(7) =0a(8) =0a(9) =0a(10) =1a(11) =0a(12) =0a(13) =0a(14) =0a(15) =0a(16) =1a(17) =2a(18) =3a(19) =0a(20) =0a(21) =1a(22) =2a(23) =1a(24) =1a(25) =1a(26) =2a(27) =2a(28) =2a(29) =2

External references