The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
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

%I #34 Oct 31 2018 22:07:05

%S 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,

%T 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,

%U 1394,318,50,8,1,1,0,1,0,17575,0,11963,0,519,0,9,0,1

%N 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.

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

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

%H Alois P. Heinz, <a href="/A204459/b204459.txt">Antidiagonals d=0..60</a>

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

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

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

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

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

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

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

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

%e 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}.

%e 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}.

%e Square array A(n,k) begins:

%e 1, 0, 0, 0, 0, 0, 0, 0, ...

%e 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 0, 2, 0, 8, 0, 58, 0, ...

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

%e 1, 0, 4, 0, 86, 0, 3486, 0, ...

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

%e 1, 0, 6, 0, 318, 0, 32134, 0, ...

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

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

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

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

%p end:

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

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

%p end:

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

%t 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_ *)

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

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

%Y Main diagonal gives: A052456.

%K nonn,tabl

%O 0,13

%A _Alois P. Heinz_, Jan 15 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 May 17 00:45 EDT 2024. Contains 372555 sequences. (Running on oeis4.)