login
A361045
Array read by descending antidiagonals. A(n, k) is, if n > 0, the number of multiset combinations of {0, 1} whose type is defined in the comments. A(0, k) = k + 1.
1
1, 2, 1, 3, 4, 1, 4, 10, 6, 1, 5, 20, 19, 8, 1, 6, 35, 44, 30, 10, 1, 7, 56, 85, 76, 43, 12, 1, 8, 84, 146, 155, 116, 58, 14, 1, 9, 120, 231, 276, 245, 164, 75, 16, 1, 10, 165, 344, 448, 446, 355, 220, 94, 18, 1, 11, 220, 489, 680, 735, 656, 485, 284, 115, 20, 1
OFFSET
0,2
COMMENTS
A combination of a multiset M is an unordered selection of k objects of M, where every object can appear at most as many times as it appears in M.
A(n, k) = Sum_{j=0..k} Cardinality(Combination(MultiSet(1^[j*n], 0^[(k-j)*n]))), where MultiSet(r^[s], u^[v]) denotes a set that contains the element r with multiplicity s and the element u with multiplicity v; thus the multisets under consideration have n*k elements. Since the base set is {1, 0} the elements can be represented as binary strings. Applying the combination operator to the multisets results in a set of binary strings where '0' resp. '1' can appear at most j*n resp. (k-j)*n times. 'At most' means that they do not have to appear; in other words, the resulting set always includes the empty string ''.
This construction is the counterpart of A361043, generated by substituting 'Permutations' with 'Combinations' in the formulas (resp. programs). But since the resulting sets are not disjoint, this leads to multiple counting of some elements. If this is not desired, one can choose the variant described in A361682.
LINKS
Cyann Donnot, Antoine Genitrini and Yassine Herida, Unranking Combinations Lexicographically: an efficient new strategy compared with others, HAL Id: hal-02462764, 2020.
EXAMPLE
Array A(n, k) starts:
[0] 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... A000027
[1] 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, ... A000292
[2] 1, 6, 19, 44, 85, 146, 231, 344, 489, 670, ... A005900
[3] 1, 8, 30, 76, 155, 276, 448, 680, 981, 1360, ... A100175
[4] 1, 10, 43, 116, 245, 446, 735, 1128, 1641, 2290, ... A336288
[5] 1, 12, 58, 164, 355, 656, 1092, 1688, 2469, 3460, ...
[6] 1, 14, 75, 220, 485, 906, 1519, 2360, 3465, 4870, ...
.
Triangle T(n, k) starts:
[0] 1;
[1] 2, 1;
[2] 3, 4, 1;
[3] 4, 10, 6, 1;
[4] 5, 20, 19, 8, 1;
[5] 6, 35, 44, 30, 10, 1;
[6] 7, 56, 85, 76, 43, 12, 1;
[7] 8, 84, 146, 155, 116, 58, 14, 1;
[8] 9, 120, 231, 276, 245, 164, 75, 16, 1;
[9] 10, 165, 344, 448, 446, 355, 220, 94, 18, 1;
.
A(2, 3) = card('', 0, 00, 000, 0000) + card('', 1, 0, 11, 10, 00, 110, 100, 1100) + card('', 1, 11, 111, 1111) = 5 + 9 + 5 = 19.
PROG
(SageMath)
def A(n: int, k: int) -> int:
if n == 0: return k + 1
count = 0
for a in range(0, n * k + 1, n):
S = [i < a for i in range(n * k)]
count += Combinations(S).cardinality()
return count
def ARow(n: int, size: int) -> list[int]:
return [A(n, k) for k in range(size)]
for n in range(7): print([n], ARow(n, 6))
CROSSREFS
Columns: A000012, A005843, A028878.
Cf. A361682 (combinations with unique elements), A361043 (multiset permutations).
Sequence in context: A143326 A327086 A186686 * A053122 A078812 A104711
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Mar 21 2023
STATUS
approved