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

%I #10 Sep 11 2021 10:46:51

%S 4097,4098,4099,4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,

%T 4110,4111,4113,4130,4147,4164,4181,4198,4215,4232,4249,4266,4283,

%U 4300,4317,4334,4351,4353,4354,4355,4356,4357,4358

%N Numbers having, in base 16, (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(hex(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(4359)))) # _Michael S. Branicky_, Sep 11 2021

%Y Cf. A104619.

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

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

%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 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)