cp's OEIS Frontend

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.

A361682 Array read by descending antidiagonals. A(n, k) is the number of multiset combinations of {0, 1} whose type is defined in the comments. Also A(n, k) = hypergeom([-k, -2], [1], n).

This page as a plain text file.
%I A361682 #16 Mar 23 2023 07:57:37
%S A361682 1,1,1,1,3,1,1,6,5,1,1,10,13,7,1,1,15,25,22,9,1,1,21,41,46,33,11,1,1,
%T A361682 28,61,79,73,46,13,1,1,36,85,121,129,106,61,15,1,1,45,113,172,201,191,
%U A361682 145,78,17,1,1,55,145,232,289,301,265,190,97,19,1
%N A361682 Array read by descending antidiagonals. A(n, k) is the number of multiset combinations of {0, 1} whose type is defined in the comments. Also A(n, k) = hypergeom([-k, -2], [1], n).
%C A361682 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 A361682 A(n, k) = Cardinality(Union_{j=0..k} 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 A361682 In contrast to the procedure in A361045 we consider here the cardinality of the set union and not the sum of the individual cardinalities. If you want to exclude the empty string, you will find the sequences listed in A361521. The same construction with multiset permutations instead of multiset combinations results in A361043.
%C A361682 A different view can be taken if one considers the hypergeometric representation, hypergeom([-k, -m], [1], n). This is a family of arrays that includes the 'rascal' triangle: the all 1's array A000012 (m = 0), the rascal array A077028 (m = 1), this array (m = 2), and A361731 (m = 3).
%F A361682 A(n, k) = 1 + n*k*(4 + n*(k - 1))/2.
%F A361682 T(n, k) = 1 + k*(n - k)*(4 + k*(n - k - 1))/2.
%F A361682 A(n, k) = [x^k] (1 + (n - 1)*x)^2 / (1 - x)^3.
%F A361682 A(n, k) = hypergeom([-k, -2], [1], n).
%F A361682 A(n, k) = A361521(n, k) + 1.
%e A361682 Array A(n, k) starts:
%e A361682    [0] 1,  1,   1,    1,   1,   1,   1,    1, ...  A000012
%e A361682    [1] 1,  3,   6,   10,  15,  21,  28,   36, ...  A000217
%e A361682    [2] 1,  5,  13,   25,  41,  61,  85,  113, ...  A001844
%e A361682    [3] 1,  7,  22,   46,  79, 121, 172,  232, ...  A038764
%e A361682    [4] 1,  9,  33,   73, 129, 201, 289,  393, ...  A081585
%e A361682    [5] 1, 11,  46,  106, 191, 301, 436,  596, ...  A081587
%e A361682    [6] 1, 13,  61,  145, 265, 421, 613,  841, ...  A081589
%e A361682    [7] 1, 15,  78,  190, 351, 561, 820, 1128, ...  A081591
%e A361682    000012  | A028872 | A239325 |
%e A361682        A005408    A100536   A069133
%e A361682 .
%e A361682 Triangle T(n, k) starts:
%e A361682    [0] 1;
%e A361682    [1] 1,  1;
%e A361682    [2] 1,  3,   1;
%e A361682    [3] 1,  6,   5,   1;
%e A361682    [4] 1, 10,  13,   7,   1;
%e A361682    [5] 1, 15,  25,  22,   9,   1;
%e A361682    [6] 1, 21,  41,  46,  33,  11,   1;
%e A361682    [7] 1, 28,  61,  79,  73,  46,  13,  1;
%e A361682    [8] 1, 36,  85, 121, 129, 106,  61, 15,  1;
%e A361682    [9] 1, 45, 113, 172, 201, 191, 145, 78, 17, 1.
%e A361682 .
%e A361682 Row 4 of the triangle:
%e A361682 A(0, 4) =  1 = card('').
%e A361682 A(1, 3) = 10 = card('', 0, 00, 000, 1, 10, 100, 11, 110, 111).
%e A361682 A(2, 2) = 13 = card('', 0, 00, 000, 0000, 1, 10, 100, 11, 110, 1100, 111, 1111).
%e A361682 A(3, 1) =  7 = card('', 0, 00, 000, 1, 11, 111).
%e A361682 A(4, 0) =  1 = card('').
%p A361682 A := (n, k) -> 1 + n*k*(4 + n*(k - 1))/2:
%p A361682 for n from 0 to 7 do seq(A(n, k), k = 0..7) od;
%p A361682 # Alternative:
%p A361682 ogf := n -> (1 + (n - 1)*x)^2 / (1 - x)^3:
%p A361682 ser := n -> series(ogf(n), x, 12):
%p A361682 row := n -> seq(coeff(ser(n), x, k), k = 0..9):
%p A361682 seq(print(row(n)), n = 0..7);
%o A361682 (SageMath)
%o A361682 def A(m: int, steps: int) -> int:
%o A361682     if m == 0: return 1
%o A361682     size = m * steps
%o A361682     cset = set()
%o A361682     for a in range(0, size + 1, m):
%o A361682         S = [str(int(i < a)) for i in range(size)]
%o A361682         C = Combinations(S)
%o A361682         cset.update("".join(i for i in c) for c in C)
%o A361682     return len(cset)
%o A361682 def ARow(n: int, size: int) -> list[int]:
%o A361682     return [A(n, k) for k in range(size + 1)]
%o A361682 for n in range(8): print(ARow(n, 7))
%Y A361682 Rows: A000012, A000217, A001844, A038764, A081585, A081587, A081589, A081591.
%Y A361682 Columns: A000012, A005408, A028872, A100536, A239325, A069133.
%Y A361682 Cf. A239592 (main diagonal), A239331 (transposed array).
%Y A361682 Cf. A361045, A361043, A361521, A361731, A077028.
%K A361682 nonn,tabl
%O A361682 0,5
%A A361682 _Peter Luschny_, Mar 21 2023