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.

A212137 Triangular array: T(n,k) is the number of k-element subsets of {1,...,n} whose average is not an integer.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 0, 4, 2, 1, 0, 6, 6, 4, 0, 0, 9, 12, 11, 4, 1, 0, 12, 22, 26, 16, 6, 0, 0, 16, 36, 52, 44, 24, 6, 1, 0, 20, 54, 94, 100, 70, 30, 8, 0, 0, 25, 78, 156, 200, 176, 102, 39, 8, 1, 0, 30, 108, 246, 368, 386, 282, 144, 48, 10, 0, 0, 36, 144, 369, 632, 772, 678, 431, 194, 60, 10, 1
Offset: 1

Views

Author

Clark Kimberling, May 06 2012

Keywords

Comments

Alternating row sums: -1,-2,-3,-4,-5,-6,...
Let S(n,k) be the number in row n and column k of the array A061865; then S(n,k)+T(n,k)=C(n,k), for 1<=k<=n, n>=1.

Examples

			First 7 rows:
0
0...1
0...2....0
0...4....2....1
0...6....6....4....0
0...9....12...11...4....1
0...12...22...26...16...6...0
		

Crossrefs

Cf. A061865.

Programs

  • Mathematica
    t[n_, k_] := t[n, k] =
      Count[Map[IntegerQ[Mean[#]] &, Subsets[Range[n], {k}]], False]
    Flatten[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
    TableForm[Table[t[n, k], {n, 1, 12}, {k, 1, n}]]
    s[n_] := Sum[t[n, k], {k, 1, n}]
    (* Peter J. C. Moses, May 01 2012 *)