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!)
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 (list; graph; refs; listen; history; text; internal format)
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

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 March 29 09:14 EDT 2024. Contains 371268 sequences. (Running on oeis4.)