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!)
A255568 Numbers in whose binary representation there are six 1-bits more than there are nonleading 0-bits. 2

%I #16 Dec 16 2015 14:34:53

%S 63,191,223,239,247,251,253,254,639,703,735,751,759,763,765,766,831,

%T 863,879,887,891,893,894,927,943,951,955,957,958,975,983,987,989,990,

%U 999,1003,1005,1006,1011,1013,1014,1017,1018,1020,2303,2431,2495,2527,2543,2551,2555

%N Numbers in whose binary representation there are six 1-bits more than there are nonleading 0-bits.

%C Numbers for which A037861(n) = -6.

%C Numbers in whose binary representation (A007088) the number of 1-bits = 6 + number of (nonleading) 0 bits.

%H Antti Karttunen, <a href="/A255568/b255568.txt">Table of n, a(n) for n = 1..16303</a>

%e 63 ("111111" in binary) is included because there are 0 zero-bits and six 1-bits.

%e 191 ("10111111" in binary) is included because there is 1 zero-bit and seven 1-bits, thus there are six 1-bits more than the number of 0-bits.

%o (Scheme, with _Antti Karttunen_'s IntSeq-library)

%o (define A255568 (MATCHING-POS 1 1 (lambda (n) (= -6 (A037861 n)))))

%o (Perl) use ntheory ":all"; my $bits = 0; for (1..1000) { my $o = hammingweight($_); $bits++ if ($_ & ($_-1))==0; say if $o == 6+$bits-$o; } # _Dana Jacobsen_, Dec 16 2015

%o (PARI) is(n)=2*hammingweight(n)==6+#binary(n) \\ _Charles R Greathouse IV_, Dec 16 2015

%o (PARI) for(b=3,6, for(n=2^(2*b-1),4^b-1, if(hammingweight(n)==3+b, print1(n", ")))) \\ _Charles R Greathouse IV_, Dec 16 2015

%o (PARI) listBBitMembers(b)=if(b%2,return([])); my(u=List()); forvec(v=vector(3+b/2,i,[0,b-1]), listput(u, sum(i=1,#v,2^v[i])),2); Vec(u) \\ _Charles R Greathouse IV_, Dec 16 2015

%Y Cf. A007088, A037861.

%Y The intersection of A030130 and A023689 is a finite subsequence of this sequence.

%K nonn,base,easy

%O 1,1

%A _Antti Karttunen_, Mar 11 2015

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 August 28 15:41 EDT 2024. Contains 375507 sequences. (Running on oeis4.)