a(n)=Sum{|d(i)-d(i-1)|: i=1,...,m}, where Sum{d(i)*9^i: i=0,1,...,m} is the base 9 representation of n.

A037841

a(n)=Sum{|d(i)-d(i-1)|: i=1,...,m}, where Sum{d(i)*9^i: i=0,1,...,m} is the base 9 representation of n.

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