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

A037886

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

Terms

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

External references