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.

A240021 Number T(n,k) of partitions of n into distinct parts, where k is the difference between the number of odd parts and the number of even parts; triangle T(n,k), n>=0, read by rows.

This page as a plain text file.
%I A240021 #42 Feb 11 2015 04:09:56
%S A240021 1,1,1,1,1,1,0,0,1,2,1,1,1,0,1,1,1,3,1,1,1,0,2,2,2,4,1,0,1,2,1,1,4,2,
%T A240021 4,5,1,1,1,1,2,1,2,6,3,1,6,6,1,2,2,1,3,1,5,9,3,2,9,7,2,4,3,2,3,2,8,12,
%U A240021 4,0,1,4,12,8,3,7,4,3,4,3,14,16,4,1,1,7,16,9,6,11,5,1,4,4,6,20,20,5,2,2
%N A240021 Number T(n,k) of partitions of n into distinct parts, where k is the difference between the number of odd parts and the number of even parts; triangle T(n,k), n>=0, read by rows.
%C A240021 T(n,k) is defined for all n >= 0, k in A001057.  Row n contains all terms from the leftmost to the rightmost nonzero term.  All other terms (not in the triangle) are equal to 0. First nonzero term of column k>=0 is at n = k^2, first nonzero term of column k<=0 is at n = k*(k+1).
%C A240021 T(n,k) = T(n+k,-k).
%C A240021 T(2n*(2n+1),2n) = A000041(n).
%C A240021 T(4n^2+14n+11,2n+2) = A000070(n).
%C A240021 T(n^2,n) = 1.
%C A240021 T(n^2,n-1) = 0.
%C A240021 T(n^2,n-2) = A209815(n+1).
%C A240021 T(n^2+1,n-1) = A000065(n).
%C A240021 T(n,0) = A239241(n).
%C A240021 Sum_{k<=-1} T(n,k) = A239239(n).
%C A240021 Sum_{k<=0} T(n,k) = A239240(n).
%C A240021 Sum_{k>=1} T(n,k) = A239242(n).
%C A240021 Sum_{k>=0} T(n,k) = A239243(n).
%C A240021 Sum_{k=-1..1} T(n,k) = A239881(n).
%C A240021 T(n,-1) + T(n,1) = A239880(n).
%C A240021 Sum_{k=-n..n} T(n,k) = A000009 (row sums).
%H A240021 Alois P. Heinz, <a href="/A240021/b240021.txt">Rows n = 0..500, flattened</a>
%F A240021 G.f.: prod(n>=1, 1 + e(n)*q^n ) = 1 + sum(n>=1, e(n)*q^n * prod(k=1..n-1, 1+e(k)*q^k) ) where e(n) = u if n odd, otherwise 1/u; see Pari program. [_Joerg Arndt_, Apr 01 2014]
%e A240021 T(12,-3) = 1: [6,4,2].
%e A240021 T(12,-2) = 2: [10,2], [8,4].
%e A240021 T(12,-1) = 1: [12].
%e A240021 T(12,0) = 2: [6,3,2,1], [5,4,2,1].
%e A240021 T(12,1) = 6: [9,2,1], [8,3,1], [7,4,1], [7,3,2], [6,5,1], [5,4,3].
%e A240021 T(12,2) = 3: [11,1], [9,3], [7,5].
%e A240021 T(13,-1) = 6: [10,2,1], [8,4,1], [8,3,2], [7,4,2], [6,5,2], [6,4,3].
%e A240021 T(14,-2) = 3: [12,2], [10,4], [8,6].
%e A240021 Triangle T(n,k) begins:
%e A240021 : n\k : -3 -2 -1  0  1  2  3  ...
%e A240021 +-----+--------------------------
%e A240021 :  0  :           1
%e A240021 :  1  :              1
%e A240021 :  2  :        1
%e A240021 :  3  :           1, 1
%e A240021 :  4  :        1, 0, 0, 1
%e A240021 :  5  :           2, 1
%e A240021 :  6  :     1, 1, 0, 1, 1
%e A240021 :  7  :        1, 3, 1
%e A240021 :  8  :     1, 1, 0, 2, 2
%e A240021 :  9  :        2, 4, 1, 0, 1
%e A240021 : 10  :     2, 1, 1, 4, 2
%e A240021 : 11  :        4, 5, 1, 1, 1
%e A240021 : 12  :  1, 2, 1, 2, 6, 3
%e A240021 : 13  :     1, 6, 6, 1, 2, 2
%e A240021 : 14  :  1, 3, 1, 5, 9, 3
%p A240021 b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0, `if`(n=0, 1,
%p A240021       expand(b(n, i-1)+`if`(i>n, 0, b(n-i, i-1)*x^(2*irem(i, 2)-1)))))
%p A240021     end:
%p A240021 T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(b(n$2)):
%p A240021 seq(T(n), n=0..20);
%t A240021 b[n_, i_] := b[n, i] = If[n>i*(i+1)/2, 0, If[n == 0, 1, Expand[b[n, i-1] + If[i>n, 0, b[n-i, i-1]*x^(2*Mod[i, 2]-1)]]]]; T[n_] := Function[{p}, Table[ Coefficient[p, x, i], {i, Exponent[p, x, Min], Exponent[p, x]}]][b[n, n]]; Table[ T[n], {n, 0, 20}] // Flatten (* _Jean-François Alcover_, Feb 11 2015, after _Alois P. Heinz_ *)
%o A240021 (PARI)
%o A240021 N=20; q='q+O('q^N);
%o A240021 e(n) = if(n%2!=0, u, 1/u);
%o A240021 gf = prod(n=1,N, 1 + e(n)*q^n );
%o A240021 V = Vec( gf );
%o A240021 { for (j=1, #V,  \\ print triangle, including leading zeros
%o A240021     for (i=0, N-j, print1("   "));  \\ padding
%o A240021     for (i=-j+1, j-1, print1(polcoeff(V[j], i, u),", "));
%o A240021     print();
%o A240021 ); }
%o A240021 /* _Joerg Arndt_, Apr 01 2014 */
%Y A240021 Columns k=0-10 give: A239241, A239871(n+1), A240138, A240139, A240140, A240141, A240142, A240143, A240144, A240145, A240146.
%Y A240021 Cf. A240009.
%K A240021 nonn,tabf,look
%O A240021 0,10
%A A240021 _Alois P. Heinz_, Mar 31 2014