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.

A383353 Square array A(n,k), n>=0, k>=0, read by antidiagonals downwards, where n 2-colored objects are distributed into k containers of two kinds. Containers may be left empty.

Original entry on oeis.org

1, 2, 0, 3, 4, 0, 4, 8, 6, 0, 5, 12, 22, 8, 0, 6, 16, 38, 40, 10, 0, 7, 20, 54, 92, 73, 12, 0, 8, 24, 70, 144, 196, 112, 14, 0, 9, 28, 86, 196, 354, 376, 172, 16, 0, 10, 32, 102, 248, 512, 760, 678, 240, 18, 0, 11, 36, 118, 300, 670, 1200, 1554, 1136, 335, 20, 0
Offset: 0

Views

Author

Peter Dolland, Apr 24 2025

Keywords

Examples

			Array starts:
 0 : [1,  2,   3,    4,     5,     6,     7,      8,      9,     10,     11, ...]
 1 : [0,  4,   8,   12,    16,    20,    24,     28,     32,     36,     40, ...]
 2 : [0,  6,  22,   38,    54,    70,    86,    102,    118,    134,    150, ...]
 3 : [0,  8,  40,   92,   144,   196,   248,    300,    352,    404,    456, ...]
 4 : [0, 10,  73,  196,   354,   512,   670,    828,    986,   1144,   1302, ...]
 5 : [0, 12, 112,  376,   760,  1200,  1640,   2080,   2520,   2960,   3400, ...]
 6 : [0, 14, 172,  678,  1554,  2640,  3810,   4980,   6150,   7320,   8490, ...]
 7 : [0, 16, 240, 1136,  2936,  5436,  8272,  11228,  14184,  17140,  20096, ...]
 8 : [0, 18, 335, 1826,  5315, 10674, 17216,  24262,  31473,  38684,  45895, ...]
 9 : [0, 20, 440, 2812,  9136, 19984, 34192,  50248,  67024,  84020, 101016, ...]
10 : [0, 22, 578, 4186, 15188, 36024, 65512, 100488, 138188, 176878, 215854, ...]
...
		

Crossrefs

Antidiagonal sums give A161870.
Cf. A382345 (1-color), A381891 (1-kind), A026820 (1-color, 1-kind).
Cf. A278710.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0 or i=1, (n+1)*x^n,
          add(b(n-i*j, min(n-i*j, i-1))*binomial(i+j, j)*x^j, j=0..n/i)))
        end:
    g:= proc(n, k) option remember;
          `if`(k<0, 0, g(n, k-1)+coeff(b(n$2), x, k))
        end:
    A:= (n, k)-> add(add(g(j, h)*g(n-j, k-h), h=0..k), j=0..n):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, May 05 2025
  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    def calc_w( k , m):
        s = 0
        for p in partitions( m, m=k+1):
            fact = 1
            j = k + 1
            for x in p :
                fact *= binomial( j, p[x]) * (x + 1) ** p[x]
                j -= p[x]
            s += fact
        return s
    def a_row( n, length=11):
        if n == 0 : return [ k + 1 for k in range( length) ]
        t = list( [0] * length)
        for p in partitions( n):
            fact = 1
            s = 0
            for k in p :
                s += p[k]
                fact *= calc_w( k, p[k])
            if s > 0 :
                t[s - 1] += fact
        t = [0] + t
        for i in range( 1, length):
            t[i+1] += t[i] * 2 - t[i - 1]
        return t

Formula

A(0,k) = k + 1.
A(1,k) = 4*k.
A(2,k+1) = 6 + 16 * k.
A(n,1) = 2 + 2 * n.
A(n,n+k) = A(n,n) + k * A383352(n,n).
A(n,k) = Sum_{i=0..k} (k + 1 - i) * A383351(n,i) for 0 <= k <= n.
Sum_{k=0..n} (-1)^k*T(n-k,k) = A278710(n). - Alois P. Heinz, May 05 2025