This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A037850 a(n)=Sum{d(i-1)-d(i): d(i)

%I

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

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

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

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

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

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

%p A037850 := proc(n)

%p a := 0 ;

%p dgs := convert(n,base,9);

%p for i from 2 to nops(dgs) do

%p if op(i,dgs)<op(i-1,dgs) then

%p a := a-op(i,dgs)+op(i-1,dgs) ;

%p end if;

%p end do:

%p a ;

%p end proc: # _R. J. Mathar_, Oct 19 2015

%t g[n_, b_] := Differences[IntegerDigits[n, b]]; b = 9; z = 120;

%t Table[-Total[Select[g[n, b], # < 0 &]], {n, 1, z}]; (*A037859*)

%t Table[Total[Select[g[n, b], # > 0 &]], {n, 1, z}]; (*A037850*)

%Y Cf. A297330, A037859.

%K nonn,base

%O 1,12

%A _Clark Kimberling_

%E Definition swapped with A037859. - _R. J. Mathar_, Oct 19 2015

%E Updated by _Clark Kimberling_, Jan 19 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 13 06:26 EST 2019. Contains 329968 sequences. (Running on oeis4.)