This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A037836 #14 Jan 20 2018 12:37:54 %S A037836 0,0,0,1,0,1,2,2,1,0,1,3,2,1,0,1,2,3,4,1,0,1,2,3,2,1,2,5,4,3,2,2,3,4, %T A037836 5,2,1,2,3,2,1,0,1,4,3,2,1,3,4,5,6,3,2,3,4,3,2,1,2,3,2,1,0,1,2,3,4,3, %U A037836 2,3,4,5,4,3,4,7,6,5,4,1,2,3,4,1,0,1,2,3,2,1 %N A037836 a(n) = Sum{|d(i)-d(i-1)|: i=1,...,m}, where Sum{d(i)*4^i: i=0,1,...,m} is the base 4 representation of n. %C A037836 This is the base-4 total variation sequence; see A297330. - _Clark Kimberling_, Jan 18 2017 %H A037836 Clark Kimberling, <a href="/A037836/b037836.txt">Table of n, a(n) for n = 1..10000</a> %p A037836 A037836 := proc(n) %p A037836 local dgs ; %p A037836 dgs := convert(n,base,4); %p A037836 add( abs(op(i,dgs)-op(i-1,dgs)),i=2..nops(dgs)) ; %p A037836 end proc: # _R. J. Mathar_, Oct 16 2015 %t A037836 b = 4; z = 120; t = Table[Total@Flatten@Map[Abs@Differences@# &, Partition[IntegerDigits[n, b], 2, 1]], {n, z}] (* cf. _Michael De Vlieger_, A037834 *) %Y A037836 Cf. A297330. %K A037836 nonn,base %O A037836 1,7 %A A037836 _Clark Kimberling_ %E A037836 Updated by _Clark Kimberling_, Jan 20 2018