A052839 Number of partitions of n into distinct summands (A000009), plus 1 (apart from the first term).
1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 11, 13, 16, 19, 23, 28, 33, 39, 47, 55, 65, 77, 90, 105, 123, 143, 166, 193, 223, 257, 297, 341, 391, 449, 513, 586, 669, 761, 865, 983, 1114, 1261, 1427, 1611, 1817, 2049, 2305, 2591, 2911, 3265, 3659, 4098, 4583, 5121, 5719, 6379
Offset: 0
Links
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 806
Programs
-
Maple
spec := [S,{C=Sequence(Z,1 <= card),B=PowerSet(C),S=Union(B,C)},unlabeled]: seq(combstruct[count](spec,size=n), n=0..67); Or: with(gfun,seriestolist); seriestolist(series(mul(1+z^i,i=1..81)+z/(1-z),z,81));
-
Mathematica
a[n_] := If[n == 0, 1, PartitionsQ[n] + 1]; a /@ Range[0, 55] (* Jean-François Alcover, May 07 2020 *)
Formula
G.f.: (-x-exp(Sum(-(-1)^(j[1]+1)*x^j[1]/(x^j[1]-1)/j[1], j[1]=1 .. infinity))+exp(Sum(-(-1)^(j[1]+1)*x^j[1]/(x^j[1]-1)/j[1], j[1]=1 .. infinity))*x)/(-1+x)
Extensions
Edited by Antti Karttunen, Feb 13 2002, based on information received from Bruno Salvy.