OFFSET
1,2
COMMENTS
The normal definition of signed partitions does not allow zero as a part.
Signed partitions of n into n parts in {-n..n}\{0}: A211474.
EXAMPLE
a(3) = 7: (-3,3,3), (-2,2,3), (-1,1,3), (-1,2,2), (0,0,3), (0,1,2), (1,1,1).
MAPLE
b:= proc(h, i, t, n) option remember;
`if`(i=0, `if`(h=0, 1, 0), `if`(h<0 or i*n<h, 0,
add (b(h+j, i-1, j, n), j=-n..t)))
end:
a:= n-> b(n$4):
seq (a(n), n=1..15); # Alois P. Heinz, Apr 12 2012
MATHEMATICA
Table[(IntegerPartitions[n, {1, n}] // Length) + Sum[Sum[(IntegerPartitions[k, {j}, Range[n]] // Length) * (IntegerPartitions[n + k, {1, n - j}, Range[n]] // Length), {j, 0, n - 2}], {k, 1, n*Floor[(n - 1)/2]}], {n, 14}]
(* Second program: *)
b[h_, i_, t_, n_] := b[h, i, t, n] =
If[i == 0, If[h == 0, 1, 0], If[h < 0 || i*n < h, 0,
Sum[b[h + j, i - 1, j, n], {j, Range[-n, t]}]]];
a[n_] := b[n, n, n, n];
Array[a, 24] (* Jean-François Alcover, May 31 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David Scambler, Apr 12 2012
EXTENSIONS
More terms from Alois P. Heinz, Apr 12 2012
STATUS
approved