A100568 Number of compositions of n(n^2+1)/2 into n distinct parts each no more than n^2.
1, 1, 4, 48, 2064, 167280, 23136480, 4824953280, 1417422988800, 557894688341760, 283527366696806400, 180770613278509900800, 141310830114906688051200, 132919668653581764822067200, 148111929489204170921816985600, 192952383265326280925512415232000
Offset: 0
Keywords
Examples
a(2)=4 since 5 can be written 1+4, 2+3, 3+2 or 4+1.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..150
- Henry Bottomley, Partition and composition calculator
Programs
-
Maple
b := proc(n, i, t) option remember; `if`(n
t*(2*i-t+1)/2, 0, `if`(n=0, 1, b(n, i-1, t) + `if`(n `if`(n=0, 1, n!*b(n*(n^2+1)/2, n^2, n)): seq(a(n), n=0..12); # Peter Luschny, May 06 2014, after Alois P. Heinz -
Mathematica
RecursionLimit = 1000; b[n_, i_, t_] /; i < t || n < t*((t+1)/2) || n > t*((2*i-t+1)/2) = 0; b[0, , ] = 1; b[n_, i_, t_] := b[n, i, t] = b[n, i-1, t] + If[n < i, 0, b[n-i, i-1, t-1]]; a[, 0] = 1; a[0, ] = 0; a[n_, k_] := With[{s = k*(k*n+1)}, If[Mod[s, 2] == 1, 0, b[s/2, k*n, k]]]; a[n_] := a[n] = a[n, n]*n!; Table[Print[a[n]]; a[n], {n, 0, 14}] (* Jean-François Alcover, Aug 15 2013, after Alois P. Heinz *)
Formula
a(n) = A000142(n)*A052456(n). a(n) is close to n^(2n-5/2)*sqrt(6/(pi*e)) in the sense that the ratio between the two tends to 1 as n increases. Experimentally, something like n^(2n) * sqrt(6 / (pi * e * (n^5 - 1.366...n^4 + 1.146...n^3 - 0.826...n^2 + 0.413...n + 0.115...))) seems to be even closer.
Comments