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

A037882

a(n)=(1/2)*Sum{|d(i)-e(i)|} where Sum{d(i)*5^i} is the base 5 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) =1a(7) =2a(8) =3a(9) =0a(10) =0a(11) =0a(12) =1a(13) =2a(14) =0a(15) =0a(16) =0a(17) =0a(18) =1a(19) =0a(20) =0a(21) =0a(22) =0a(23) =0a(24) =0a(25) =1a(26) =2a(27) =3a(28) =4a(29) =0

External references