This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A361045 #14 Mar 23 2023 07:57:47 %S A361045 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, %T A361045 8,84,146,155,116,58,14,1,9,120,231,276,245,164,75,16,1,10,165,344, %U A361045 448,446,355,220,94,18,1,11,220,489,680,735,656,485,284,115,20,1 %N 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. %C A361045 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. %C A361045 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 ''. %C A361045 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. %H A361045 Cyann Donnot, Antoine Genitrini and Yassine Herida, <a href="https://hal.sorbonne-universite.fr/hal-02462764">Unranking Combinations Lexicographically: an efficient new strategy compared with others</a>, HAL Id: hal-02462764, 2020. %e A361045 Array A(n, k) starts: %e A361045 [0] 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... A000027 %e A361045 [1] 1, 4, 10, 20, 35, 56, 84, 120, 165, 220, ... A000292 %e A361045 [2] 1, 6, 19, 44, 85, 146, 231, 344, 489, 670, ... A005900 %e A361045 [3] 1, 8, 30, 76, 155, 276, 448, 680, 981, 1360, ... A100175 %e A361045 [4] 1, 10, 43, 116, 245, 446, 735, 1128, 1641, 2290, ... A336288 %e A361045 [5] 1, 12, 58, 164, 355, 656, 1092, 1688, 2469, 3460, ... %e A361045 [6] 1, 14, 75, 220, 485, 906, 1519, 2360, 3465, 4870, ... %e A361045 . %e A361045 Triangle T(n, k) starts: %e A361045 [0] 1; %e A361045 [1] 2, 1; %e A361045 [2] 3, 4, 1; %e A361045 [3] 4, 10, 6, 1; %e A361045 [4] 5, 20, 19, 8, 1; %e A361045 [5] 6, 35, 44, 30, 10, 1; %e A361045 [6] 7, 56, 85, 76, 43, 12, 1; %e A361045 [7] 8, 84, 146, 155, 116, 58, 14, 1; %e A361045 [8] 9, 120, 231, 276, 245, 164, 75, 16, 1; %e A361045 [9] 10, 165, 344, 448, 446, 355, 220, 94, 18, 1; %e A361045 . %e A361045 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. %o A361045 (SageMath) %o A361045 def A(n: int, k: int) -> int: %o A361045 if n == 0: return k + 1 %o A361045 count = 0 %o A361045 for a in range(0, n * k + 1, n): %o A361045 S = [i < a for i in range(n * k)] %o A361045 count += Combinations(S).cardinality() %o A361045 return count %o A361045 def ARow(n: int, size: int) -> list[int]: %o A361045 return [A(n, k) for k in range(size)] %o A361045 for n in range(7): print([n], ARow(n, 6)) %Y A361045 Rows: A000027, A000292, A005900, A100175, A336288. %Y A361045 Columns: A000012, A005843, A028878. %Y A361045 Cf. A361682 (combinations with unique elements), A361043 (multiset permutations). %K A361045 nonn,tabl %O A361045 0,2 %A A361045 _Peter Luschny_, Mar 21 2023