login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033265 Number of i such that d(i)>=d(i-1), where Sum{d(i)*2^i: i=0,1,...,m} is base 2 representation of n. 4
0, 1, 1, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 3, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, 4, 4, 4, 4, 3, 4, 4, 5, 4, 4, 4, 5, 4, 5, 5, 6, 5, 5, 5, 5, 4, 5, 5, 5, 4, 4, 4, 5, 4, 5, 5, 5, 4, 4, 4, 4, 3, 4, 4, 5, 4, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537

R. Stephan, Some divide-and-conquer sequences ...

R. Stephan, Table of generating functions

Index entries for sequences related to binary expansion of n

FORMULA

a(0) = 0, a(2n) = a(n) + 1, a(2n+1) = a(n) + [n odd]. a(n) = A014081(n) + A023416(n). G.f. 1/(1-x) * sum(k>=0, (t^2+t^3+t^4)/((1+t)*(1+t^2)), t=x^2^k). - Ralf Stephan, Oct 05 2003

a(n) = -1 + A297113(A005940(1+n)). - Antti Karttunen, Dec 30 2017

EXAMPLE

The base-2 representation of n=4 is 100 with d(0)=0, d(1)=0, d(2)=1. There are two rise-or-equal, one from d(0) to d(1) and one from d(1) to d(2), so a(4)=2. - R. J. Mathar, Oct 16 2015

MAPLE

A033265 := proc(n)

    a := 0 ;

    dgs := convert(n, base, 2);

    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 16 2015

CROSSREFS

Cf. A014081, A023416, A037800, A037809, A005940, A156552, A297113.

Sequence in context: A064122 A263922 A057526 * A096004 A193495 A071068

Adjacent sequences:  A033262 A033263 A033264 * A033266 A033267 A033268

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

EXTENSIONS

Sign in Name corrected. - R. J. Mathar, Oct 16 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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 21 22:56 EST 2018. Contains 299427 sequences. (Running on oeis4.)