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, 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
Examples
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.
Links
- Cyann Donnot, Antoine Genitrini and Yassine Herida, Unranking Combinations Lexicographically: an efficient new strategy compared with others, HAL Id: hal-02462764, 2020.
Crossrefs
Programs
-
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))
Comments