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.

A382025 Triangle read by rows: T(n, k) is the number of partitions of n with at most k parts where 0 <= k <= n, and each part is one of three kinds.

Original entry on oeis.org

1, 0, 3, 0, 3, 9, 0, 3, 12, 22, 0, 3, 18, 36, 51, 0, 3, 21, 57, 87, 108, 0, 3, 27, 82, 148, 193, 221, 0, 3, 30, 111, 225, 330, 393, 429, 0, 3, 36, 144, 333, 528, 681, 765, 810, 0, 3, 39, 184, 460, 808, 1106, 1316, 1424, 1479, 0, 3, 45, 225, 630, 1182, 1740, 2163, 2439, 2574, 2640
Offset: 0

Views

Author

Peter Dolland, Mar 12 2025

Keywords

Comments

The 1-kind case is Euler's table A026820.
The 2-kind case is A381895.

Examples

			Triangle starts:
 0 : [1]
 1 : [0, 3]
 2 : [0, 3,  9]
 3 : [0, 3, 12,  22]
 4 : [0, 3, 18,  36,  51]
 5 : [0, 3, 21,  57,  87,  108]
 6 : [0, 3, 27,  82, 148,  193,  221]
 7 : [0, 3, 30, 111, 225,  330,  393,  429]
 8 : [0, 3, 36, 144, 333,  528,  681,  765,  810]
 9 : [0, 3, 39, 184, 460,  808, 1106, 1316, 1424, 1479]
10 : [0, 3, 45, 225, 630, 1182, 1740, 2163, 2439, 2574, 2640]
...
		

Crossrefs

Main diagonal gives A000716.

Programs

  • Python
    from sympy import binomial
    from sympy.utilities.iterables import partitions
    from sympy.combinatorics.partitions import IntegerPartition
    kinds = 3 - 1   # the number of part kinds - 1
    def a382025_row( n):
        if n == 0 : return [1]
        t = list( [0] * n)
        for p in partitions( n):
            p = IntegerPartition( p).as_dict()
            fact = 1
            s = 0
            for k in p :
                s += p[k]
                fact *= binomial( kinds + p[k], kinds)
            if s > 0 :
                t[s - 1] += fact
        for i in range( n - 1):
            t[i+1] += t[i]
        return [0] + t