The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A237882 Numbers k such that LR0(k) > LR1(k), where LR0(k) = A087117(k) is the length of the longest run of zeros in the binary representation of k, LR1(k) = A038374(k) is the length of the longest run of ones. 2
0, 4, 8, 9, 16, 17, 18, 20, 24, 32, 33, 34, 35, 36, 37, 40, 41, 48, 49, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 80, 81, 82, 84, 88, 96, 97, 98, 99, 104, 112, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 144, 145, 146, 148, 149, 152, 160 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
klrQ[n_]:=With[{sidn2=Split[IntegerDigits[n, 2]]}, Max[Length/@Select[sidn2, #[[1]]==0&]]>Max[Length/@Select[sidn2, #[[1]]==1&]]]; Select[Range[ 0, 200], klrQ] (* Harvey P. Dale, May 05 2018 *)
PROG
(Python)
for n in range(1000):
b = bin(n).lstrip("0b")
L0 = L1 = 0
s = '0'
if n==0: b=s
while b.find(s)>=0:
s += '0'
L0 += 1
s = '1'
while b.find(s)>=0:
s += '1'
L1 += 1
if L0>L1: print str(n)+', ',
CROSSREFS
Cf. A090050 (numbers k such that LR0(k) = LR1(k)).
Cf. A237883 (numbers k such that LR0(k) < LR1(k)).
Sequence in context: A018196 A072103 A004756 * A153034 A106840 A242663
KEYWORD
nonn,base
AUTHOR
Alex Ratushnyak, Feb 14 2014
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 May 14 03:08 EDT 2024. Contains 372528 sequences. (Running on oeis4.)