login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A162535
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.
3
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, 40, 41, 42, 43, 45, 46, 47, 49, 51, 53, 55, 56, 58, 59, 61, 62, 67, 71, 73, 75, 77, 79, 83, 85, 89, 91, 97, 101, 103, 105, 107, 109, 111, 113, 115, 119, 121, 123, 127, 128, 131, 133
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
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
Sequence in context: A039103 A228082 A153088 * A279814 A047490 A357065
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