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!)
A037818 Number of i such that d(i)>d(i-1), where Sum{d(i)*3^i: i=0,1,....,m} is base 3 representation of n. 2
0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,21
COMMENTS
From Jeffrey Shallit, May 15 2016: (Start)
A "3-regular" sequence that satisfies the recurrences
a(3n+2) = a(n)
a(9n) = a(9n+1) = a(3n)
a(9n+4) = a(3n+1)
a(9n+6) = a(9n+7) = a(n) + 1
a(27n+3) = a(3n) + 1
a(27n+12) = a(9n+3)
a(27n+21) = a(n) + 2
(End)
LINKS
MAPLE
A037818 := proc(n)
a := 0 ;
dgs := convert(n, base, 3);
for i from 2 to nops(dgs) do
if op(i, dgs)>op(i-1, dgs) then
a := a+1 ;
end if;
end do:
a ;
end proc: # R. J. Mathar, Oct 15 2015
MATHEMATICA
a[n_] := Count[Differences@ IntegerDigits[n, 3], x_ /; x < 0]; Array[a, 90] (* Giovanni Resta, May 15 2016 *)
CROSSREFS
Sequence in context: A178535 A025449 A047988 * A087116 A033264 A258045
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Sign in name corrected by R. J. Mathar, Oct 15 2015
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 March 29 08:13 EDT 2024. Contains 371265 sequences. (Running on oeis4.)