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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A277937 Number of runs of 1's of length 1 in the binary expansion of n. 1
0, 1, 1, 0, 1, 2, 0, 0, 1, 2, 2, 1, 0, 1, 0, 0, 1, 2, 2, 1, 2, 3, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 2, 3, 1, 1, 2, 3, 3, 2, 1, 2, 1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 2, 3, 1, 1, 2, 3, 3, 2, 1, 2, 1, 1, 2, 3, 3, 2, 3, 4, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

2^a(n) is the run length transform of 1,2,1,1,1,1,....

LINKS

Chai Wah Wu, Table of n, a(n) for n = 0..10000

FORMULA

a(2n) = a(n), a(4n+1) = a(8n+1) = a(n) + 1, a(8n+3) = a(n), a(8n+5) = a(2n+1) + 1, a(8n+7) = a(4n+3).

EXAMPLE

a(25) = 1 since 25 = 11001_2 has one runs of 1's of length 1.

PROG

(Python)

def A277937(n):

    return sum(1 for d in bin(n)[2:].split('0') if len(d) == 1)

CROSSREFS

Sequence in context: A257900 A039971 A205593 * A112020 A069160 A089616

Adjacent sequences:  A277934 A277935 A277936 * A277938 A277939 A277940

KEYWORD

nonn

AUTHOR

Chai Wah Wu, Mar 24 2017

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 20 21:05 EST 2019. Contains 320345 sequences. (Running on oeis4.)