cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A204459 #34 Oct 31 2018 22:07:05
%S A204459 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 A204459 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 A204459 1394,318,50,8,1,1,0,1,0,17575,0,11963,0,519,0,9,0,1
%N 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.
%C A204459 A(n,k) is the number of partitions of k*(k*n+1)/2 into k distinct parts <=k*n.
%C A204459 A(n,k) = 0 if k>0 and (n = 0 or k*(k*n+1) mod 2 = 1).
%H A204459 Alois P. Heinz, <a href="/A204459/b204459.txt">Antidiagonals d=0..60</a>
%e A204459 A(0,0) = 1: {}.
%e A204459 A(1,1) = 1: {1}.
%e A204459 A(5,1) = 1: {3}.
%e A204459 A(1,5) = 1: {1,2,3,4,5}.
%e A204459 A(2,2) = 2: {1,4}, {2,3}.
%e A204459 A(3,2) = 3: {1,6}, {2,5}, {3,4}.
%e A204459 A(2,3) = 0: no subset of {1,2,3,4,5,6} has element sum 3*(3*2+1)/2 = 21/2.
%e A204459 A(4,2) = 4: {1,8}, {2,7}, {3,6}, {4,5}.
%e A204459 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 A204459 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 A204459 Square array A(n,k) begins:
%e A204459   1, 0, 0,  0,   0,    0,     0,      0, ...
%e A204459   1, 1, 1,  1,   1,    1,     1,      1, ...
%e A204459   1, 0, 2,  0,   8,    0,    58,      0, ...
%e A204459   1, 1, 3,  8,  33,  141,   676,   3370, ...
%e A204459   1, 0, 4,  0,  86,    0,  3486,      0, ...
%e A204459   1, 1, 5, 25, 177, 1394, 11963, 108108, ...
%e A204459   1, 0, 6,  0, 318,    0, 32134,      0, ...
%e A204459   1, 1, 7, 50, 519, 5910, 73294, 957332, ...
%p A204459 b:= proc(n, i, t) option remember;
%p A204459       `if`(i<t or n<t*(t+1)/2 or n>t*(2*i-t+1)/2, 0,
%p A204459       `if`(n=0, 1, b(n, i-1, t) +`if`(n<i, 0, b(n-i, i-1, t-1))))
%p A204459     end:
%p A204459 A:= proc(n, k) local s; s:= k*(k*n+1);
%p A204459       `if`(k=0, 1, `if`(n=0 or irem(s, 2)=1, 0, b(s/2, k*n, k)))
%p A204459     end:
%p A204459 seq(seq(A(n, d-n), n=0..d), d=0..15);
%t A204459 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 A204459 Rows n=0-10 give: A000007, A000012, A063074, A109655, A204460, A204461, A204462, A204463, A204464, A204465, A204466.
%Y A204459 Columns k=0..10 give: A000012, A000035, A001477, A204467, A204468, A204469, A204470, A204471, A204472, A204473, A204474.
%Y A204459 Main diagonal gives: A052456.
%K A204459 nonn,tabl
%O A204459 0,13
%A A204459 _Alois P. Heinz_, Jan 15 2012