OFFSET
1,7
COMMENTS
This is the base-4 total variation sequence; see A297330. - Clark Kimberling, Jan 18 2017
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
MAPLE
A037836 := proc(n)
local dgs ;
dgs := convert(n, base, 4);
add( abs(op(i, dgs)-op(i-1, dgs)), i=2..nops(dgs)) ;
end proc: # R. J. Mathar, Oct 16 2015
MATHEMATICA
b = 4; z = 120; t = Table[Total@Flatten@Map[Abs@Differences@# &, Partition[IntegerDigits[n, b], 2, 1]], {n, z}] (* cf. Michael De Vlieger, A037834 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Updated by Clark Kimberling, Jan 20 2018
STATUS
approved