A108492 Sum of NumberOfParts!/NumberOfDifferentParts! for all integer partitions of n.
1, 1, 3, 8, 31, 141, 819, 5562, 43773, 389203, 3858136, 42152116, 503098359, 6511429138, 90824834615, 1358130449902, 21672033893102, 367570633594883, 6602838664294634, 125228962373218571, 2500582942246200527, 52437202425839368049, 1152133477802718430790
Offset: 0
Keywords
Examples
a(4) = 31 because n=4 has the following A000041(4) = 5 partitions: i=1: (1111) with p(1,4)=4, d(1,4)=1; 4!/1! = 24; i=2: (112) with p(2,4)=3, d(2,4)=2; 3!/2! = 3; i=3: (13) with p(3,4)=2, d(3,4)=2; 2!/2! = 1; i=4: (4) with p(4,4)=1, d(4,4)=1; 1!/1! = 1; i=5: (22) with p(5,4)=2, d(5,4)=1; 2!/1! = 2; Their contributions sum up to 24+3+1+1+2 = 31 = a(4).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
Programs
-
Maple
A108492 := proc(n::integer) local i,prttnlst,prttn,ZahlTeile,liste,ZahlVerschiedenerTeile,A108492; # Procedure A108492 calculates the sequence A108492 for the integer partitions of n. prttn = an integer partition of n. See also http://www.thomas-wieder.privat.t-online.de/default.html prttnlst:=partition(n); A108492 := 0; for i from 1 to nops(prttnlst) do prttn := prttnlst[i]; ZahlTeile := nops(prttn); liste := convert(prttn,multiset); ZahlVerschiedenerTeile := nops(liste); A108492 := A108492 + (ZahlTeile!/ZahlVerschiedenerTeile!); od; print(n,A108492); end proc; # Second Maple program: b:= proc(n,i,l,p,d) option remember; if n<0 then 0 elif n=0 then p!/d! elif i=0 then 0 else b(n, i-1, l, p, d) +b(n-i, i, i, p+1, `if`(i=l, d, d+1)) fi end: a:= n-> b(n, n, 0, 0, 0): seq(a(n), n=0..30); # Alois P. Heinz, Apr 25 2011
-
Mathematica
b[n_, i_, l_, p_, d_] := b[n, i, l, p, d] = Which[n<0, 0, n==0, p!/d!, i==0, 0, True, b[n, i-1, l, p, d]+b[n-i, i, i, p+1, If[i==l, d, d+1]]]; a[n_] := b[n, n, 0, 0, 0]; a /@ Range[0, 30] (* Jean-François Alcover, Nov 18 2020, after Alois P. Heinz *)
Formula
a(n) = Sum_{i=1..A000041(n)} p(i,n)!/d(i,n)! with p(i,n) = number of parts of the i-th partition of n and d(i,n) = number of different parts of the i-th partition of n.
a(n) ~ n! * (1 + 1/(2*n) + 1/n^2 + 13/(6*n^3) + 19/(3*n^4) + 22/n^5 + 2057/(24*n^6)). - Vaclav Kotesovec, Sep 06 2015