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!)
A044873 Numbers having, in base 2, (sum of even run lengths)=(sum of odd run lengths). 3

%I #10 Sep 11 2021 10:47:07

%S 9,11,13,133,135,140,143,146,148,150,152,154,156,161,164,166,172,175,

%T 178,180,182,189,196,198,200,202,206,210,212,214,216,218,220,225,228,

%U 230,236,239,241,245,247,2065,2069,2071,2077

%N Numbers having, in base 2, (sum of even run lengths)=(sum of odd run lengths).

%o (Python)

%o from itertools import groupby

%o def ok(n):

%o rl_sums = [0, 0]

%o for k, g in groupby(bin(n)[2:]):

%o rl = len(list(g))

%o rl_sums[rl%2] += rl

%o return rl_sums[0] == rl_sums[1]

%o print(list(filter(ok, range(2078)))) # _Michael S. Branicky_, Sep 11 2021

%Y Cf. A007088.

%Y Cf. A044874, A044875, A044876, A044877, A044878, A044879, A044880.

%Y Cf. A044881, A044882, A044883, A044884, A044885, A044886, A044887.

%K nonn,base

%O 1,1

%A _Clark Kimberling_

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 25 09:49 EDT 2024. Contains 371967 sequences. (Running on oeis4.)