login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A037835 Sum{|d(i)-d(i-1)|: i=0,1,...,m}, where Sum{d(i)*3^i: i=0,1,...,m} is base 3 representation of n. 2
0, 0, 1, 0, 1, 2, 1, 0, 1, 2, 3, 1, 0, 1, 3, 2, 1, 2, 3, 4, 2, 1, 2, 2, 1, 0, 1, 2, 3, 3, 2, 3, 5, 4, 3, 1, 2, 3, 1, 0, 1, 3, 2, 1, 3, 4, 5, 3, 2, 3, 3, 2, 1, 2, 3, 4, 4, 3, 4, 6, 5, 4, 2, 3, 4, 2, 1, 2, 4, 3, 2, 2, 3, 4, 2, 1, 2, 2, 1, 0, 1, 2, 3, 3, 2, 3, 5, 4, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
This is the base-3 total variation sequence; see A297330. - Clark Kimberling
LINKS
MAPLE
A037835 := proc(n)
local dgs ;
dgs := convert(n, base, 3);
add( abs(op(i, dgs)-op(i-1, dgs)), i=2..nops(dgs)) ;
end proc: # R. J. Mathar, Oct 16 2015
MATHEMATICA
b = 3; z = 120; t = Table[Total@Flatten@Map[Abs@Differences@# &, Partition[IntegerDigits[n, b], 2, 1]], {n, z}] (* cf. Michael De Vlieger, A037834 *)
CROSSREFS
Cf. A297330.
Sequence in context: A308151 A114219 A119339 * A116433 A360099 A106509
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Updated by Clark Kimberling, Jan 19 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 08:27 EDT 2024. Contains 371769 sequences. (Running on oeis4.)