OFFSET
0,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..444
FORMULA
a(n) ~ c^(1/4) * exp(2*sqrt(c*n) - n) * n^(n+1/2) / (sqrt(5) * n^(3/4)), where c = -polylog(2, -1/2 - I/2) - polylog(2, -1/2 + I/2) = 0.9669456127221570300837545... Equivalently, c = -Sum_{k>=1} (-1)^k * cos(Pi*k/4) / (k^2 * 2^(k/2-1)). - Vaclav Kotesovec, Oct 01 2017
EXAMPLE
Let's consider the partitions of n where no positive integer appears more than twice. (See A000726)
For n = 5,
partition | |
--------------------------------------------------------------------
5 -> one 5 -> 1/(1!) (= 1 )
= 4 + 1 -> one 4 and one 1 -> 1/(1!*1!) (= 1 )
= 3 + 2 -> one 3 and one 2 -> 1/(1!*1!) (= 1 )
= 3 + 1 + 1 -> one 3 and two 1 -> 1/(1!*2!) (= 1/2)
= 2 + 2 + 1 -> two 2 and one 1 -> 1/(2!*1!) (= 1/2)
--------------------------------------------------------------------
sum 4
So a(5) = 5! * 4 = 480.
For n = 6,
partition | |
--------------------------------------------------------------------
6 -> one 6 -> 1/(1!) (= 1 )
= 5 + 1 -> one 5 and one 1 -> 1/(1!*1!) (= 1 )
= 4 + 2 -> one 4 and one 2 -> 1/(1!*1!) (= 1 )
= 4 + 1 + 1 -> one 4 and two 1 -> 1/(1!*2!) (= 1/2)
= 3 + 3 -> two 3 -> 1/(2!) (= 1/2)
= 3 + 2 + 1 -> one 3, one 2 and one 1 -> 1/(1!*1!*1!) (= 1 )
= 2 + 2 + 1 + 1 -> two 2 and two 1 -> 1/(2!*2!) (= 1/4)
--------------------------------------------------------------------
sum 21/4
So a(6) = 6! * 21/4 = 3780.
MAPLE
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
add(b(n-i*j, i-1)/j!, j=0..min(2, n/i))))
end:
a:= n-> n!*b(n$2):
seq(a(n), n=0..23); # Alois P. Heinz, Oct 02 2017
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[b[n - i j, i - 1]/j!, {j, 0, Min[2, n/i]}]]];
a[n_] := n! b[n, n];
a /@ Range[0, 23] (* Jean-François Alcover, Nov 01 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Oct 01 2017
STATUS
approved