login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A211475 Signed partitions of n into n parts in {-n..n} (allowing zero as a part). 1

%I #11 May 31 2021 05:37:59

%S 1,2,7,27,121,587,2983,15744,85375,473259,2670383,15293119,88686530,

%T 519864702,3075894246,18348407371,110244289384,666651567920,

%U 4054481396896,24786629709850,152241407914480,939069024577371,5815027475345028,36137289604644570

%N Signed partitions of n into n parts in {-n..n} (allowing zero as a part).

%C The normal definition of signed partitions does not allow zero as a part.

%C Signed partitions of n into n parts in {-n..n}\{0}: A211474.

%e a(3) = 7: (-3,3,3), (-2,2,3), (-1,1,3), (-1,2,2), (0,0,3), (0,1,2), (1,1,1).

%p b:= proc(h, i, t, n) option remember;

%p `if`(i=0, `if`(h=0, 1, 0), `if`(h<0 or i*n<h, 0,

%p add (b(h+j, i-1, j, n), j=-n..t)))

%p end:

%p a:= n-> b(n$4):

%p seq (a(n), n=1..15); # _Alois P. Heinz_, Apr 12 2012

%t 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}]

%t (* Second program: *)

%t b[h_, i_, t_, n_] := b[h, i, t, n] =

%t If[i == 0, If[h == 0, 1, 0], If[h < 0 || i*n < h, 0,

%t Sum[b[h + j, i - 1, j, n], {j, Range[-n, t]}]]];

%t a[n_] := b[n, n, n, n];

%t Array[a, 24] (* _Jean-François Alcover_, May 31 2021, after _Alois P. Heinz_ *)

%Y Cf. A211474.

%K nonn

%O 1,2

%A _David Scambler_, Apr 12 2012

%E More terms from _Alois P. Heinz_, Apr 12 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:20 EDT 2024. Contains 371964 sequences. (Running on oeis4.)