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.

Showing 1-1 of 1 results.

A282011 Number T(n,k) of k-element subsets of [n] having an even sum; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 2, 4, 6, 3, 0, 1, 3, 6, 10, 9, 3, 0, 1, 3, 9, 19, 19, 9, 3, 1, 1, 4, 12, 28, 38, 28, 12, 4, 1, 1, 4, 16, 44, 66, 60, 40, 20, 5, 0, 1, 5, 20, 60, 110, 126, 100, 60, 25, 5, 0, 1, 5, 25, 85, 170, 226, 226, 170, 85, 25, 5, 1, 1, 6, 30, 110, 255, 396, 452, 396, 255, 110, 30, 6, 1
Offset: 0

Views

Author

Alois P. Heinz, Feb 04 2017

Keywords

Comments

Row n is symmetric if and only if n mod 4 in {0,3} (or if T(n,n) = 1).

Examples

			T(5,0) = 1: {}.
T(5,1) = 2: {2}, {4}.
T(5,2) = 4: {1,3}, {1,5}, {2,4}, {3,5}.
T(5,3) = 6: {1,2,3}, {1,2,5}, {1,3,4}, {1,4,5}, {2,3,5}, {3,4,5}.
T(5,4) = 3: {1,2,3,4}, {1,2,4,5}, {2,3,4,5}.
T(5,5) = 0.
T(7,7) = 1: {1,2,3,4,5,6,7}.
Triangle T(n,k) begins:
  1;
  1, 0;
  1, 1,  0;
  1, 1,  1,   1;
  1, 2,  2,   2,   1;
  1, 2,  4,   6,   3,   0;
  1, 3,  6,  10,   9,   3,   0;
  1, 3,  9,  19,  19,   9,   3,   1;
  1, 4, 12,  28,  38,  28,  12,   4,   1;
  1, 4, 16,  44,  66,  60,  40,  20,   5,   0;
  1, 5, 20,  60, 110, 126, 100,  60,  25,   5,  0;
  1, 5, 25,  85, 170, 226, 226, 170,  85,  25,  5, 1;
  1, 6, 30, 110, 255, 396, 452, 396, 255, 110, 30, 6, 1;
		

Crossrefs

Columns k=0..10 give (offsets may differ): A000012, A004526, A002620, A005993, A005994, A032092, A032093, A018211, A018212, A282077, A282078.
Row sums give A011782.
Main diagonal gives A133872(n+1).
Lower diagonals T(n+j,n) for j=1..10 give: A004525(n+1), A282079, A228705, A282080, A282081, A282082, A282083, A282084, A282085, A282086.
T(2n,n) gives A119358.

Programs

  • Maple
    b:= proc(n, s) option remember; expand(
          `if`(n=0, s, b(n-1, s)+x*b(n-1, irem(s+n, 2))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 1)):
    seq(T(n), n=0..16);
  • Mathematica
    Flatten[Table[Sum[Binomial[Ceiling[n/2],2j]Binomial[Floor[n/2],k-2j],{j,0,Floor[(n+1)/4]}],{n,0,10},{k,0,n}]] (* Indranil Ghosh, Feb 26 2017 *)
  • PARI
    a(n,k)=sum(j=0,floor((n+1)/4),binomial(ceil(n/2),2*j)*binomial(floor(n/2),k-2*j));
    tabl(nn)={for(n=0,nn,for(k=0,n,print1(a(n,k),", "););print(););} \\ Indranil Ghosh, Feb 26 2017

Formula

T(n,k) = Sum_{j=0..floor((n+1)/4)} C(ceiling(n/2),2*j) * C(floor(n/2),k-2*j).
T(n,k) = A007318(n,k) - A159916(n,k).
Sum_{k=0..n} k * T(n,k) = A057711(n-1) for n>0.
Sum_{k=0..n} (k+1) * T(n,k) = A087447(n) + [n=2].
Showing 1-1 of 1 results.