OFFSET
0,2
COMMENTS
Consider an ordered 1 X n tiling of white tiles whose lengths are all distinct from each other, and whose sum is n. Now introduce into this tiling a red square. The resulting number of compositions is a(n). - Gregory L. Simay, Oct 25 2019
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Alois P. Heinz)
FORMULA
a(n) = Sum_k (k+1)! * A008289(n,k). - Alois P. Heinz, Dec 12 2012
EXAMPLE
a(3) = 8 because for any m > 6 the number of compositions of e.g. m=7 into distinct parts where the largest part is exactly m-3 = 7-3 = 4 is eight, since 7 can be written as 4+3 = 4+2+1 = 4+1+2 = 3+4 = 2+4+1 = 2+1+4 = 1+4+2 = 1+2+4.
Note that in the example immediately above, 4 corresponds to the red square, since it is greater than--and therefore distinct from--parts 1,2 and 3, which correspond to the distinct white tiles. More generally, for the compositions of n having all parts distinct, the red square must correspond to a positive integer > n in order for the number of resulting compositions to be a(n). - Gregory L. Simay, Oct 25 2019
MAPLE
b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
-> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0))) end:
a:= proc(n) local l; l:= b(n, n): add( i! * l[i], i=1..nops(l)) end:
seq(a(n), n=0..50); # Alois P. Heinz, Dec 12 2012
MATHEMATICA
b[n_, i_] := If[n == 0, {1}, If[i<1, {}, Plus @@ PadRight[{b[n, i-1], If[i>n, {}, Prepend[b[n-i, i-1], 0]]}]]]; a[n_] := Module[{l}, l = b[n, n]; Sum[i!*l[[i]], {i, 1, Length[l]}]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 31 2014, after Alois P. Heinz *)
PROG
(PARI)
N=66; q='q+O('q^N);
gf=sum(n=0, N, (n+1)!*q^(n*(n+1)/2) / prod(k=1, n, 1-q^k ) );
Vec(gf)
/* Joerg Arndt, Oct 20 2012 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jun 21 2002
STATUS
approved