A116861 Triangle read by rows: T(n,k) is the number of partitions of n such that the sum of the parts, counted without multiplicities, is equal to k (n>=1, k>=1).
1, 1, 1, 1, 0, 2, 1, 1, 1, 2, 1, 0, 2, 1, 3, 1, 1, 3, 1, 1, 4, 1, 0, 3, 2, 2, 2, 5, 1, 1, 3, 3, 2, 4, 2, 6, 1, 0, 5, 2, 3, 4, 4, 3, 8, 1, 1, 4, 3, 4, 7, 4, 5, 3, 10, 1, 0, 5, 3, 4, 7, 7, 6, 6, 5, 12, 1, 1, 6, 4, 3, 12, 6, 8, 7, 9, 5, 15, 1, 0, 6, 4, 5, 10, 10, 9, 10, 11, 10, 7, 18, 1, 1, 6, 4, 5, 15, 11, 13, 9, 16, 11, 13, 8, 22
Offset: 1
Examples
T(10,7) = 4 because we have [6,1,1,1,1], [4,3,3], [4,2,2,1,1] and [4,2,1,1,1,1] (6+1=4+3=4+2+1=7). Triangle starts: 1; 1, 1; 1, 0, 2; 1, 1, 1, 2; 1, 0, 2, 1, 3; 1, 1, 3, 1, 1, 4; 1, 0, 3, 2, 2, 2, 5; 1, 1, 3, 3, 2, 4, 2, 6; 1, 0, 5, 2, 3, 4, 4, 3, 8; 1, 1, 4, 3, 4, 7, 4, 5, 3, 10; 1, 0, 5, 3, 4, 7, 7, 6, 6, 5, 12; 1, 1, 6, 4, 3, 12, 6, 8, 7, 9, 5, 15; ...
Links
- Alois P. Heinz, Rows n = 1..141, flattened
- P. J. Rossky, M. Karplus, The enumeration of Goldstone diagrams in many-body perturbation theory, J. Chem. Phys. 64 (1976) 1569, equation (16)(1).
Crossrefs
Programs
-
Maple
g:= -1+product(1+t^j*x^j/(1-x^j), j=1..40): gser:= simplify(series(g,x=0,18)): for n from 1 to 14 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 14 do seq(coeff(P[n],t^j),j=1..n) od; # yields sequence in triangular form # second Maple program: b:= proc(n, i) option remember; local f, g, j; if n=0 then [1] elif i<1 then [ ] else f:= b(n, i-1); for j to n/i do f:= zip((x, y)->x+y, f, [0$i, b(n-i*j, i-1)[]], 0) od; f fi end: T:= n-> subsop(1=NULL, b(n, n))[]: seq(T(n), n=1..20); # Alois P. Heinz, Feb 27 2013
-
Mathematica
max = 14; s = Series[-1+Product[1+t^j*x^j/(1-x^j), {j, 1, max}], {x, 0, max}, {t, 0, max}] // Normal; t[n_, k_] := SeriesCoefficient[s, {x, 0, n}, {t, 0, k}]; Table[t[n, k], {n, 1, max}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 17 2014 *) Table[Length[Select[IntegerPartitions[n],Total[Union[#]]==k&]],{n,0,10},{k,0,n}] (* Gus Wiseman, Aug 29 2023 *)
-
PARI
A116861(n,k,s=0)={forpart(X=n,vecsum(Set(X))==k&&s++,k);s} \\ M. F. Hasler, Oct 27 2019
Comments