A381895 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 two kinds.
1, 0, 2, 0, 2, 5, 0, 2, 6, 10, 0, 2, 9, 15, 20, 0, 2, 10, 22, 30, 36, 0, 2, 13, 31, 48, 58, 65, 0, 2, 14, 40, 68, 90, 102, 110, 0, 2, 17, 51, 97, 135, 162, 176, 185, 0, 2, 18, 64, 128, 194, 242, 274, 290, 300, 0, 2, 21, 77, 171, 271, 357, 415, 452, 470, 481
Offset: 0
Examples
Triangle starts: 0 : [1] 1 : [0, 2] 2 : [0, 2, 5] 3 : [0, 2, 6, 10] 4 : [0, 2, 9, 15, 20] 5 : [0, 2, 10, 22, 30, 36] 6 : [0, 2, 13, 31, 48, 58, 65] 7 : [0, 2, 14, 40, 68, 90, 102, 110] 8 : [0, 2, 17, 51, 97, 135, 162, 176, 185] 9 : [0, 2, 18, 64, 128, 194, 242, 274, 290, 300] 10 : [0, 2, 21, 77, 171, 271, 357, 415, 452, 470, 481] ...
Links
- Alois P. Heinz, Rows n = 0..150, flattened
Programs
-
PARI
A381895(row_max) = {my(N=row_max+1,x='x+O('x^N), y='y+O('y^N), h=prod(i=1,N, 1/(1-y*x^i)^2)/(1-y)); for(n=0,N-1, if(n<1, print([1]),print(concat([0],Vec(polcoeff(h, n))[1..n]))))} A381895(12) \\ John Tyler Rascoe, Mar 19 2025
-
Python
from sympy.utilities.iterables import partitions from sympy.combinatorics.partitions import IntegerPartition def a381895_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 *= 1 + p[k] if s > 0 : t[s - 1] += fact for i in range( n - 1): t[i+1] += t[i] return [0] + t
Formula
G.f.: A(x,y,2) where A(x,y,p) = 1/(1-y) * Product_{i>0} 1/(1-y*x^i)^p is the g.f for the number of partitions of n with at most k parts and p kinds of each part. - John Tyler Rascoe, Mar 19 2025
Comments