%I #14 Jan 31 2021 20:33:31
%S 1,2,3,5,7,8,9,10,11,13,14,15,17,19,21,23,25,27,29,31,32,33,34,35,37,
%T 40,41,42,43,45,46,47,49,51,53,55,56,58,59,61,62,67,71,73,75,77,79,83,
%U 85,89,91,97,101,103,105,107,109,111,113,115,119,121,123,127,128,131,133
%N A positive integer k is included if every length of the runs of 0's and 1's in the binary representation of k is coprime to k.
%C By "run" of 0's or 1's, it is meant: Think of binary k as a string of 0's and 1's. A single run of the digit b (0 or 1) is made up completely of consecutive digits all equal to b, and is bounded on its ends by either the digit 1-b or the end of the string.
%H Jasper Mulder, <a href="/A162535/b162535.txt">Table of n, a(n) for n=1..20000</a>
%e 103 in binary is 1100111. There is a run of two 1's in this representation, and a run of two 0's and a run of three 1's. Since 103 is coprime to each of these lengths (2 and 3), 103 is in the sequence.
%t lst = {}; For[n = 1, n <= 10000, n++, If[Fold[And, True, CoprimeQ[ #, n] & /@ (Length /@ Split[IntegerDigits[n, 2]])], Print[n]]] (* Jasper Mulder (jasper.mulder(AT)planet.nl), Jul 15 2009 *)
%t Select[Range[2^7], AllTrue[Length /@ Split@ IntegerDigits[#, 2], Function[k, CoprimeQ[#, k]]] &] (* _Michael De Vlieger_, Nov 04 2017 *)
%Y Cf. A162534, A162537.
%K base,nonn
%O 1,2
%A _Leroy Quet_, Jul 05 2009
%E Terms < 10000 from Jasper Mulder (jasper.mulder(AT)planet.nl), Jul 15 2009