login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204459 Square array A(n,k), n>=0, k>=0, read by antidiagonals: A(n,k) is the number of k-element subsets that can be chosen from {1,2,...,k*n} having element sum k*(k*n+1)/2. 23
1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1, 0, 1, 0, 3, 0, 1, 0, 1, 8, 8, 4, 1, 1, 0, 1, 0, 33, 0, 5, 0, 1, 0, 1, 58, 141, 86, 25, 6, 1, 1, 0, 1, 0, 676, 0, 177, 0, 7, 0, 1, 0, 1, 526, 3370, 3486, 1394, 318, 50, 8, 1, 1, 0, 1, 0, 17575, 0, 11963, 0, 519, 0, 9, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,13

COMMENTS

A(n,k) is the number of partitions of k*(k*n+1)/2 into k distinct parts <=k*n.

A(n,k) = 0 if k>0 and (n = 0 or k*(k*n+1) mod 2 = 1).

LINKS

Alois P. Heinz, Antidiagonals d=0..60

EXAMPLE

A(0,0) = 1: {}.

A(1,1) = 1: {1}.

A(5,1) = 1: {3}.

A(1,5) = 1: {1,2,3,4,5}.

A(2,2) = 2: {1,4}, {2,3}.

A(3,2) = 3: {1,6}, {2,5}, {3,4}.

A(2,3) = 0: no subset of {1,2,3,4,5,6} has element sum 3*(3*2+1)/2 = 21/2.

A(4,2) = 4: {1,8}, {2,7}, {3,6}, {4,5}.

A(3,3) = 8: {1,5,9}, {1,6,8}, {2,4,9}, {2,5,8}, {2,6,7}, {3,4,8}, {3,5,7}, {4,5,6}.

A(2,4) = 8: {1,2,7,8}, {1,3,6,8}, {1,4,5,8}, {1,4,6,7}, {2,3,5,8}, {2,3,6,7}, {2,4,5,7}, {3,4,5,6}.

Square array A(n,k) begins:

  1, 0, 0,  0,   0,    0,     0,      0, ...

  1, 1, 1,  1,   1,    1,     1,      1, ...

  1, 0, 2,  0,   8,    0,    58,      0, ...

  1, 1, 3,  8,  33,  141,   676,   3370, ...

  1, 0, 4,  0,  86,    0,  3486,      0, ...

  1, 1, 5, 25, 177, 1394, 11963, 108108, ...

  1, 0, 6,  0, 318,    0, 32134,      0, ...

  1, 1, 7, 50, 519, 5910, 73294, 957332, ...

MAPLE

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

      `if`(i<t or n<t*(t+1)/2 or n>t*(2*i-t+1)/2, 0,

      `if`(n=0, 1, b(n, i-1, t) +`if`(n<i, 0, b(n-i, i-1, t-1))))

    end:

A:= proc(n, k) local s; s:= k*(k*n+1);

      `if`(k=0, 1, `if`(n=0 or irem(s, 2)=1, 0, b(s/2, k*n, k)))

    end:

seq(seq(A(n, d-n), n=0..d), d=0..15);

MATHEMATICA

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]]]; Flatten[ Table[ a[n, d-n], {d, 0, 15}, {n, 0, d}]] (* Jean-Fran├žois Alcover, Jun 15 2012, translated from Maple, after Alois P. Heinz *)

CROSSREFS

Rows n=0-10 give: A000007, A000012, A063074, A109655, A204460, A204461, A204462, A204463, A204464, A204465, A204466.

Columns k=0..10 give: A000012, A000035, A001477, A204467, A204468, A204469, A204470, A204471, A204472, A204473, A204474.

Main diagonal gives: A052456.

Sequence in context: A225721 A040076 A019269 * A035155 A090584 A171400

Adjacent sequences:  A204456 A204457 A204458 * A204460 A204461 A204462

KEYWORD

nonn,tabl

AUTHOR

Alois P. Heinz, Jan 15 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 10:32 EDT 2019. Contains 328257 sequences. (Running on oeis4.)