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.

A382521 Square array A(n,k), n>=0, k>=0, read by antidiagonals downwards, where n unlabeled objects are distributed into k containers of three kinds. Containers may be left empty.

Original entry on oeis.org

1, 3, 0, 6, 3, 0, 10, 9, 3, 0, 15, 18, 15, 3, 0, 21, 30, 36, 18, 3, 0, 28, 45, 66, 55, 24, 3, 0, 36, 63, 105, 114, 81, 27, 3, 0, 45, 84, 153, 195, 189, 108, 33, 3, 0, 55, 108, 210, 298, 348, 276, 145, 36, 3, 0, 66, 135, 276, 423, 558, 552, 405, 180, 42, 3, 0, 78, 165, 351, 570, 819, 936, 858, 549, 225, 45, 3, 0
Offset: 0

Views

Author

Peter Dolland, Mar 30 2025

Keywords

Examples

			Array starts:
 0 : [1, 3,  6,  10,   15,   21,   28,    36,    45,    55,    66]
 1 : [0, 3,  9,  18,   30,   45,   63,    84,   108,   135,   165]
 2 : [0, 3, 15,  36,   66,  105,  153,   210,   276,   351,   435]
 3 : [0, 3, 18,  55,  114,  195,  298,   423,   570,   739,   930]
 4 : [0, 3, 24,  81,  189,  348,  558,   819,  1131,  1494,  1908]
 5 : [0, 3, 27, 108,  276,  552,  936,  1428,  2028,  2736,  3552]
 6 : [0, 3, 33, 145,  405,  858, 1532,  2427,  3543,  4880,  6438]
 7 : [0, 3, 36, 180,  549, 1248, 2340,  3861,  5811,  8190, 10998]
 8 : [0, 3, 42, 225,  741, 1785, 3510,  6000,  9300, 13410, 18330]
 9 : [0, 3, 45, 271,  957, 2451, 5051,  8967, 14307, 21126, 29424]
10 : [0, 3, 51, 324, 1227, 3312, 7137, 13125, 21552, 32553, 46194]
...
		

Crossrefs

Antidiagonal sums give A000716.
Alternating antidiagonal sums give A107635.
Without empty containers: A382025.
Cf. A382343, A000217, 2 kinds: A382345.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
          add(x^j*b(n-i*j, min(n-i*j, i-1))*(j+2)*(j+1)/2, j=0..n/i))))
        end:
    A:= (n, k)-> coeff(b(n+k$2), x, k):
    seq(seq(A(n, d-n), n=0..d), d=0..11);  # Alois P. Heinz, Mar 31 2025
  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    def a_row(n, length=11) :
        if n == 0 : return [ binomial( k + 2, 2) 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 *= binomial( 2 + p[k], 2)
            if s > 0 :
                t[s] += fact
        a = list( [0] * length)
        for i in range( 1, length):
            for j in range( i, 0, -1):
                a[i] += t[j] * binomial( i - j + 2, 2)
        return a
    for n in range(11): print(a_row(n))

Formula

A(0,k) = binomial(k + 2, 2) = A000217(k + 1).
A(1,k) = 3 * binomial(k + 1, 2).
A(n,1) = 3.
A(n,k) = Sum_{i=0..k} binomial(k + 2 - i, 2) * A382343(n,i) for k <= n.
A(n,k) = A382343(n+k,k).