OFFSET
1,2
COMMENTS
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.
LINKS
Jasper Mulder, Table of n, a(n) for n=1..20000
EXAMPLE
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.
MATHEMATICA
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 *)
Select[Range[2^7], AllTrue[Length /@ Split@ IntegerDigits[#, 2], Function[k, CoprimeQ[#, k]]] &] (* Michael De Vlieger, Nov 04 2017 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Jul 05 2009
EXTENSIONS
Terms < 10000 from Jasper Mulder (jasper.mulder(AT)planet.nl), Jul 15 2009
STATUS
approved