a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*10^i} is the base 10 representation of n and e(i) are the digits d(i) in nondecreasing order.
A037887
a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*10^i} is the base 10 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) =0a(11) =1a(12) =2a(13) =3a(14) =4a(15) =5a(16) =6a(17) =7a(18) =8a(19) =0a(20) =0a(21) =0a(22) =1a(23) =2a(24) =3a(25) =4a(26) =5a(27) =6a(28) =7a(29) =0
External references
- oeis: A037887