OFFSET
2,2
COMMENTS
Number of proper partitions of n into parts of two kinds (i.e. both kinds must be present). - Franklin T. Adams-Watters, Feb 08 2006
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 2..5000
INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 804
FORMULA
From Franklin T. Adams-Watters, Feb 08 2006: (Start)
G.f.: ((Product_{k>0} 1/(1-x^k))-1)^2 = (exp(Sum_{k>0} (x^k/(1-x^k)/k))-1)^2. (End)
a(n) ~ exp(2*Pi*sqrt(n/3)) / (4*3^(3/4)*n^(5/4)). - Vaclav Kotesovec, Mar 10 2018
EXAMPLE
a(4) = 22 because (1,2,3,5)*(5,3,2,1) = 5 + 6 + 6 + 5 = 22
MAPLE
spec := [S, {C=Sequence(Z, 1 <= card), B=Set(C, 1 <= card), S=Prod(B, B)}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20); # Franklin T. Adams-Watters, Feb 08 2006
# second Maple program:
a:= n-> (p-> add(p(j)*p(n-j), j=1..n-1))(combinat[numbpart]):
seq(a(n), n=2..40); # Alois P. Heinz, May 26 2018
MATHEMATICA
a[n_] := First[ ListConvolve[ pp = Array[ PartitionsP, n], pp]]; Table[ a[n], {n, 1, 36}] (* Jean-François Alcover, Oct 21 2011 *)
Table[ListConvolve[PartitionsP[Range[n]], PartitionsP[Range[n]]], {n, 40}]// Flatten (* Harvey P. Dale, Oct 29 2020 *)
PROG
(Haskell)
a048574 n = a048574_list !! (n-2)
a048574_list = f (drop 2 a000041_list) [1] where
f (p:ps) rs = (sum $ zipWith (*) rs $ tail a000041_list) : f ps (p : rs)
-- Reinhard Zumkeller, Nov 09 2015
(PARI) a(n) = sum(k=1, n-1, numbpart(k)*numbpart(n-k)); \\ Michel Marcus, Dec 11 2016
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Sep 29 2000
STATUS
approved