cp's OEIS Frontend

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.

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

This page as a plain text file.
%I A037838 #14 Jul 31 2024 09:14:03
%S A037838 0,0,0,0,0,1,0,1,2,3,4,2,1,0,1,2,3,3,2,1,0,1,2,4,3,2,1,0,1,5,4,3,2,1,
%T A037838 0,1,2,3,4,5,6,1,0,1,2,3,4,3,2,1,2,3,4,5,4,3,2,3,4,7,6,5,4,3,4,9,8,7,
%U A037838 6,5,4,2,3,4,5,6,7,2,1,2,3,4,5,2,1,0,1,2,3,4
%N A037838 a(n) = Sum{|d(i)-d(i-1)|: i=1,...,m}, where Sum{d(i)*6^i: i=0,1,...,m} is the base 6 representation of n.
%C A037838 This is the base-6 total variation sequence; see A297330. - _Clark Kimberling_, Jan 18 2017
%H A037838 Clark Kimberling, <a href="/A037838/b037838.txt">Table of n, a(n) for n = 1..10000</a>
%p A037838 A037838 := proc(n)
%p A037838     local dgs ;
%p A037838     dgs := convert(n,base,6);
%p A037838     add( abs(op(i,dgs)-op(i-1,dgs)),i=2..nops(dgs)) ;
%p A037838 end proc:
%p A037838 seq(A037838(n),n=1..100) ; # _R. J. Mathar_, Jul 31 2024
%t A037838 b = 6; z = 120; t = Table[Total@Flatten@Map[Abs@Differences@# &, Partition[IntegerDigits[n, b], 2, 1]], {n, z}] (* cf. _Michael De Vlieger_, A037834 *)
%Y A037838 Cf. A297330.
%K A037838 nonn,base
%O A037838 1,9
%A A037838 _Clark Kimberling_
%E A037838 Updated by _Clark Kimberling_, Jan 20 2018