This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A161156 Positive integers n such that {the number of (non-leading) 0's in the binary representation of n} is coprime to n, and {the number of 1's in the binary representation of n} is coprime to n, but {the number of digits in the binary representation of n} is not coprime to n. 5
 2, 8, 14, 25, 32, 33, 38, 39, 44, 45, 50, 51, 52, 56, 57, 62, 77, 91, 119, 128, 134, 146, 148, 152, 158, 164, 176, 182, 188, 194, 196, 206, 208, 214, 218, 224, 236, 242, 244, 248, 254, 267, 279, 291, 297, 309, 327, 333, 339, 351, 357, 369, 375, 381, 387, 393 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS 1 is the only integer of the form 2^k -1 (k>=0) which is coprime to the number of 0's in its binary representation, because such integers contain no binary 0's, and 0 is considered here to be coprime only to 1. LINKS Indranil Ghosh, Table of n, a(n) for n = 1..1000 MATHEMATICA Select[Range, GCD[DigitCount[#, 2, 0] , #]==1 && GCD[DigitCount[#, 2, 1], #] == 1 && GCD[Length[IntegerDigits[#, 2]], #] != 1 &] (* Indranil Ghosh, Mar 08 2017 *) PROG (PARI) b0(n) = if(n<1, 0, b0(n\2) + 1 - n%2); b1(n) = if(n<1, 0, b1(n\2) + n%2); for (n=1, 393, if(gcd(b0(n), n) == 1 && gcd(b1(n), n) == 1 && gcd(#digits(n, 2), n) != 1, print1(n", "))); \\ Indranil Ghosh, Mar 08 2017 (Python) from fractions import gcd i=j=1 while j<=1000: ....if gcd(bin(i)[2:].count("0"), i)==1 and gcd(bin(i)[2:].count("1"), i)==1 and gcd(len(bin(i)[2:]), i)!=1: ........print str(j)+" "+str(i) ........j+=1 ....i+=1 # Indranil Ghosh, Mar 08 2017 CROSSREFS Cf. A094387, A161152, A161153, A161154, A161155. Sequence in context: A121055 A107072 A120413 * A125902 A295055 A277276 Adjacent sequences:  A161153 A161154 A161155 * A161157 A161158 A161159 KEYWORD base,nonn AUTHOR Leroy Quet, Jun 03 2009 EXTENSIONS Extended by Ray Chandler, Jun 11 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 22 08:18 EDT 2019. Contains 326172 sequences. (Running on oeis4.)