login
a(n) = n! * (sum of reciprocals of parts in all partitions of n into distinct parts).
2

%I #16 Aug 18 2017 03:12:35

%S 1,1,11,38,274,2844,21888,231888,2580912,37879200,459884160,

%T 7372650240,112624905600,2002334100480,37047155846400,721997863372800,

%U 14458523340441600,320885263596441600,7222523219238297600,172441642330718208000,4367517061604788224000

%N a(n) = n! * (sum of reciprocals of parts in all partitions of n into distinct parts).

%H Alois P. Heinz, <a href="/A103738/b103738.txt">Table of n, a(n) for n = 1..400</a>

%F E.g.f.: A(x)*B(x), where A(x) = Sum_{k>0} x^k/(k*(1+x^k)) and B(x) = Product_{k>0} (1 + x^k).

%p gf:=sum(x^k/k/(1+x^k), k=1..50)*product((1+x^k), k=1..50): s:=series(gf, x, 50): for n from 1 to 30 do printf(`%d,`,coeff(s, x, n)*n!) od: # _James A. Sellers_, Apr 10 2005

%p # second Maple program:

%p b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0,

%p b(n, i-1)+`if`(i>n, 0, (p-> p+[0, p[1]/i])(b(n-i, i-1)))))

%p end:

%p a:= n-> n!*b(n$2)[2]:

%p seq(a(n), n=1..30); # _Alois P. Heinz_, Sep 11 2014

%t b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i < 1, {0, 0}, b[n, i - 1] + If[i > n, 0, Function[p, p + {0, p[[1]]/i}][b[n - i, i - 1]]]]]; a[n_] := n!*b[n, n][[2]]; Table[a[n], {n, 1, 30}] (* _Jean-François Alcover_, Jan 10 2016, after _Alois P. Heinz_ *)

%Y Cf. A057623.

%K easy,nonn

%O 1,3

%A _Vladeta Jovovic_, Mar 27 2005

%E More terms from _James A. Sellers_, Apr 10 2005