|
|
A178244
|
|
Number of distinct permutations of binary digits (0's and 1's) in n.
|
|
5
|
|
|
1, 1, 2, 1, 3, 3, 3, 1, 4, 6, 6, 4, 6, 4, 4, 1, 5, 10, 10, 10, 10, 10, 10, 5, 10, 10, 10, 5, 10, 5, 5, 1, 6, 15, 15, 20, 15, 20, 20, 15, 15, 20, 20, 15, 20, 15, 15, 6, 15, 20, 20, 15, 20, 15, 15, 6, 20, 15, 15, 6, 15, 6, 6, 1, 7, 21, 21, 35, 21, 35, 35, 35, 21, 35, 35, 35, 35, 35, 35, 21
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(0) = 1 because the only permutation is 0 (or 0 written in base 2),
a(1) = 1 because the only permutation is 1 (or 1 written in base 2),
a(3) = 2 because there are two distinct permutations of the binary digits in 2 = 10_2: {01, 10} (identity permutation and transposition tau_12).
a(12) = 6, because the binary digits of 12 = 1100_2 have 6 distinct permutations {0011, 0101, 0110, 1001, 1010, 1100}, of which only 0101, 0110, 1001, 1010 are transpositions (= permutations changing exactly 2 elements).
|
|
MAPLE
|
f:= proc(n) local L;
L:= convert(n, base, 2);
binomial(nops(L), convert(L, `+`))
end proc:
|
|
MATHEMATICA
|
|
|
PROG
|
(PARI) A178244(n)=binomial(exponent(n*2+1), hammingweight(n));
(Python)
from math import comb
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected (a 3 in the first group removed) by R. J. Mathar, May 28 2010
|
|
STATUS
|
approved
|
|
|
|