login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090706 Number of numbers having in binary representation the same number of zeros and ones as n has. 6
1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, 4, 4, 6, 4, 6, 6, 4, 4, 6, 6, 4, 6, 4, 4, 1, 1, 5, 5, 10, 5, 10, 10, 10, 5, 10, 10, 10, 10, 10, 10, 5, 5, 10, 10, 10, 10, 10, 10, 5, 10, 10, 10, 5, 10, 5, 5, 1, 1, 6, 6, 15, 6, 15, 15, 20, 6, 15, 15, 20, 15, 20, 20, 15, 6, 15, 15, 20, 15, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

a(n) = binomial(A070939(n)-1, A000120(n)-1).

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Eric Weisstein's World of Mathematics, Binary

Eric Weisstein's World of Mathematics, Digit Count

Index entries for sequences related to binary expansion of n

FORMULA

a(n) = binomial(A070939(n)-1, A023416(n)).

EXAMPLE

n=25->'11001': a(25) = #{'10011'->19, '10101'->21, '10110'->22, '11001'->25, '11010'->26, '11100'->28} = 6.

n=23->'1_0111' has 5 bits, and the lower 4 bits can be shuffled. There are 1 zero and 3 ones, so the number of combinations is C(4,1) = 4 (the zero can be in 4 positions).

n=31->'1_1111': C(4,4) = 1.

n=33->'1_00001': C(5,1) = 5 (the one can be in 5 positions).

n=35->'1_00011': C(5,2) = 10. Ruud H.G. van Tol, Apr 17 2014

MATHEMATICA

a[n_] := Binomial[Length[b = IntegerDigits[n, 2]]-1, Count[b, 0]]; a[0] = 1; Table[a[n], {n, 0, 100}] (* Jean-Fran├žois Alcover, Apr 25 2014 *)

PROG

(PARI) A090706 = n->binomial(#binary(n)-1, hammingweight(n)-(n>0)) \\ About 20% faster than the alternative "...-1)+!n". - M. F. Hasler, Jan 04 2014

CROSSREFS

Cf. A007088, A007318, A014312.

Sequence in context: A140408 A047080 A036064 * A284548 A228371 A176971

Adjacent sequences:  A090703 A090704 A090705 * A090707 A090708 A090709

KEYWORD

nonn,base

AUTHOR

Reinhard Zumkeller, Jan 15 2004

EXTENSIONS

Missing a(0)=1 added and offset adjusted by Reinhard Zumkeller, Dec 19 2012

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 27 08:39 EDT 2021. Contains 347689 sequences. (Running on oeis4.)