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.

A037847 a(n)=Sum{d(i-1)-d(i): d(i) 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 A037847 #11 Jan 19 2018 19:36:17
%S A037847 0,0,0,0,0,0,0,1,2,3,4,0,0,0,1,2,3,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,
%T A037847 0,0,1,2,3,4,5,0,0,1,2,3,4,1,1,1,2,3,4,2,2,2,2,3,4,3,3,3,3,3,4,4,4,4,
%U A037847 4,4,4,0,1,2,3,4,5,0,0,1,2,3,4,0,0,0,1,2,3,1
%N A037847 a(n)=Sum{d(i-1)-d(i): d(i)<d(i-1), i=0,1,...,m}, where Sum{d(i)*6^i: i=0,1,...,m} is the base 6 representation of n.
%C A037847 This is the base-6 up-variation sequence; see A297330. - _Clark Kimberling_, Jan 18 2017
%H A037847 Clark Kimberling, <a href="/A037847/b037847.txt">Table of n, a(n) for n = 1..10000</a>
%p A037847 A037847 := proc(n)
%p A037847     a := 0 ;
%p A037847     dgs := convert(n,base,6);
%p A037847     for i from 2 to nops(dgs) do
%p A037847         if op(i,dgs)<op(i-1,dgs) then
%p A037847             a := a-op(i,dgs)+op(i-1,dgs) ;
%p A037847         end if;
%p A037847     end do:
%p A037847     a ;
%p A037847 end proc: # _R. J. Mathar_, Oct 19 2015
%t A037847 g[n_, b_] := Differences[IntegerDigits[n, b]]; b = 6; z = 120;
%t A037847 Table[-Total[Select[g[n, b], # < 0 &]], {n, 1, z}];  (*A037856*)
%t A037847 Table[Total[Select[g[n, b], # > 0 &]], {n, 1, z}];   (*A037847*)
%Y A037847 Cf. A297330.
%K A037847 nonn,base
%O A037847 1,9
%A A037847 _Clark Kimberling_
%E A037847 Definition swapped with A037856. - _R. J. Mathar_, Oct 19 2015
%E A037847 Updated by _Clark Kimberling_, Jan 19 2018