|
|
A367680
|
|
Number of integer compositions x1+x2+...+xk of n such that each xj has exactly j bits set.
|
|
0
|
|
|
1, 1, 1, 0, 2, 1, 1, 3, 2, 1, 2, 4, 2, 4, 6, 2, 4, 5, 10, 7, 10, 12, 8, 6, 11, 14, 16, 13, 16, 16, 14, 14, 30, 32, 19, 35, 28, 23, 27, 38, 36, 47, 44, 42, 55, 52, 51, 85, 88, 74, 84, 84, 72, 81, 102, 110, 122, 115, 108, 132, 137, 136, 179, 195, 164, 160, 181
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,5
|
|
LINKS
|
|
|
EXAMPLE
|
There are 6 such compositions for n = 14:
14 = 1 + 6 + 7 (1 + 110 + 111)
14 = 2 + 5 + 7 (10 + 101 + 111)
14 = 2 + 12 (10 + 1100)
14 = 4 + 3 + 7 (100 + 11 + 111)
14 = 4 + 10 (100 + 1010)
14 = 8 + 6 (1000 + 110)
Therefore a(14) = 6.
|
|
PROG
|
(PARI) a(n) = my(nb=0); forpart(v=n, if (vecsort(apply(hammingweight, Vec(v))) == [1..#v], nb++)); nb; \\ Michel Marcus, Nov 28 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|