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.

Showing 1-3 of 3 results.

A361521 Array read by descending antidiagonals. A(n, k) is the number of the nonempty multiset combinations of {0, 1} as defined in A361682.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 5, 4, 0, 0, 9, 12, 6, 0, 0, 14, 24, 21, 8, 0, 0, 20, 40, 45, 32, 10, 0, 0, 27, 60, 78, 72, 45, 12, 0, 0, 35, 84, 120, 128, 105, 60, 14, 0, 0, 44, 112, 171, 200, 190, 144, 77, 16, 0, 0, 54, 144, 231, 288, 300, 264, 189, 96, 18, 0
Offset: 0

Views

Author

Peter Luschny, Mar 22 2023

Keywords

Comments

A detailed combinatorial interpretation can be found in A361682.

Examples

			[0] 0,  0,  0,   0,   0,   0,   0,    0, ...  A000004
[1] 0,  2,  5,   9,  14,  20,  27,   35, ...  A000096
[2] 0,  4, 12,  24,  40,  60,  84,  112, ...  A046092
[3] 0,  6, 21,  45,  78, 120, 171,  231, ...  A081266
[4] 0,  8, 32,  72, 128, 200, 288,  392, ...  A139098
[5] 0, 10, 45, 105, 190, 300, 435,  595, ...
[6] 0, 12, 60, 144, 264, 420, 612,  840, ...  A153792
[7] 0, 14, 77, 189, 350, 560, 819, 1127, ...
       | A028347 |     A163761
     A005843  A067725
.
[0] 0;
[1] 0,  0;
[2] 0,  2,   0;
[3] 0,  5,   4,   0;
[4] 0,  9,  12,   6,   0;
[5] 0, 14,  24,  21,   8,   0;
[6] 0, 20,  40,  45,  32,  10,   0;
[7] 0, 27,  60,  78,  72,  45,  12,  0;
[8] 0, 35,  84, 120, 128, 105,  60, 14,  0;
[9] 0, 44, 112, 171, 200, 190, 144, 77, 16, 0;
		

Crossrefs

Programs

  • Maple
    A := (n, k) -> n*k*(4 + n*(k - 1))/2:
    for n from 0 to 7 do seq(A(n, k), k = 0..7) od;

Formula

A(n, k) = n*k*(4 + n*(k - 1))/2.
T(n, k) = k*(n - k)*(4 + k*(n - k - 1))/2.
A(n, k) = A361682(n, k) - 1.

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.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Mar 21 2023

Keywords

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.

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.
		

Crossrefs

Columns: A000012, A005843, A028878.
Cf. A361682 (combinations with unique elements), A361043 (multiset permutations).

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))

A361731 Array read by descending antidiagonals. A(n, k) = hypergeom([-k, -3], [1], n).

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 1, 10, 7, 1, 1, 20, 25, 10, 1, 1, 35, 63, 46, 13, 1, 1, 56, 129, 136, 73, 16, 1, 1, 84, 231, 307, 245, 106, 19, 1, 1, 120, 377, 586, 593, 396, 145, 22, 1, 1, 165, 575, 1000, 1181, 1011, 595, 190, 25, 1, 1, 220, 833, 1576, 2073, 2076, 1585, 848, 241, 28, 1
Offset: 0

Views

Author

Peter Luschny, Mar 22 2023

Keywords

Examples

			Array A(n, k) starts:
 [0] 1,  1,   1,   1,    1,    1,    1,     1, ...  A000012
 [1] 1,  4,  10,  20,   35,   56,   84,   120, ...  A000292
 [2] 1,  7,  25,  63,  129,  231,  377,   575, ...  A001845
 [3] 1, 10,  46, 136,  307,  586, 1000,  1576, ...  A081583
 [4] 1, 13,  73, 245,  593, 1181, 2073,  3333, ...  A081586
 [5] 1, 16, 106, 396, 1011, 2076, 3716,  6056, ...  A081588
 [6] 1, 19, 145, 595, 1585, 3331, 6049,  9955, ...  A081590
 [7] 1, 22, 190, 848, 2339, 5006, 9192, 15240, ...
.
Table T(n, k) starts:
 [0] 1;
 [1] 1,   1;
 [2] 1,   4,   1;
 [3] 1,  10,   7,    1;
 [4] 1,  20,  25,   10,    1;
 [5] 1,  35,  63,   46,   13,    1;
 [6] 1,  56, 129,  136,   73,   16,   1;
 [7] 1,  84, 231,  307,  245,  106,  19,   1;
 [8] 1, 120, 377,  586,  593,  396, 145,  22,  1;
 [9] 1, 165, 575, 1000, 1181, 1011, 595, 190, 25, 1;
		

Crossrefs

Columns: A000012, A016777, A100536.
Hypergeometric family: A000012 (m=0), A077028 (m=1), A361682 (m=2), this array (m=3).

Programs

  • Maple
    A := (n, k) -> 1 + (((k*n - 3*n + 9)*n*k + (2*n - 9)*n + 18)*n*k)/6;
    seq(print(seq(A(n, k), k = 0..7)), n = 0..7);
    # Alternative:
    ogf := n -> (1 + (n - 1) * x)^3 / (1 - x)^4:
    ser := n -> series(ogf(n), x, 12):
    row := n -> seq(coeff(ser(n), x, k), k = 0..9):
    seq(print(row(n)), n = 0..9);

Formula

A(n, k) = [x^k] (1 + (n - 1) * x)^3 / (1 - x)^4.
A(n, k) = 1 + (((k*n - 3*n + 9)*n*k + (2*n - 9)*n + 18)*n*k)/6.
T(n, k) = 1 + (((k*(n - k) - 3*k + 9)*k*(n - k) + (2*k - 9)*k + 18)*k*(n - k))/6.
Showing 1-3 of 3 results.