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 reverse order.

A037895

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 reverse order.

Terms

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

External references