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

%I #12 Jan 21 2018 04:08:01

%S 0,0,0,0,0,0,0,1,0,1,2,3,4,5,6,2,1,0,1,2,3,4,5,3,2,1,0,1,2,3,4,4,3,2,

%T 1,0,1,2,3,5,4,3,2,1,0,1,2,6,5,4,3,2,1,0,1,7,6,5,4,3,2,1,0,1,2,3,4,5,

%U 6,7,8,1,0,1,2,3,4,5,6,3,2,1,2,3,4,5,6,5,4,3

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

%C This is the base-8 total variation sequence; see A297330. - _Clark Kimberling_, Jan 18 2017

%H Clark Kimberling, <a href="/A037840/b037840.txt">Table of n, a(n) for n = 1..10000</a>

%t b = 8; z = 120; t = Table[Total@ Flatten@ Map[Abs@ Differences@ # &, Partition[IntegerDigits[n, b], 2, 1]], {n, z}] (* cf. Michael De Vlieger, A037834 *)

%Y Cf. A297330.

%K nonn,base

%O 1,11

%A _Clark Kimberling_

%E Updated by _Clark Kimberling_, Jan 20 2018