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.

A038717 Triangular array read by rows: T(n,m) = number of ways your team can score m points in n rounds of a soccer competition (loss=0 point, draw=1 point, win=3 points), for n >= 0, 0 <= m <= 3n.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 2, 1, 2, 2, 0, 1, 1, 3, 3, 4, 6, 3, 3, 3, 0, 1, 1, 4, 6, 8, 13, 12, 10, 12, 6, 4, 4, 0, 1, 1, 5, 10, 15, 25, 31, 30, 35, 30, 20, 20, 10, 5, 5, 0, 1, 1, 6, 15, 26, 45, 66, 76, 90, 96, 80, 75, 60, 35, 30, 15, 6, 6, 0, 1, 1, 7, 21, 42, 77, 126, 168, 211, 252, 252, 245, 231
Offset: 0

Views

Author

Floor van Lamoen, May 02 2000

Keywords

Comments

n-th row has 3n+1 entries.

Examples

			Triangle begins:
  0...1...2...3...4...5...6...7...8...9..10..11..12 points
  --------------------------------------------------------
  1
  1...1...0...1
  1...2...1...2...2...0...1
  1...3...3...4...6...3...3...3...0...1
  1...4...6...8..13..12..10..12...6...4...4...0...1
		

Programs

  • Mathematica
    T[_, 0] = 1;
    T[n_, m_] /; 0 <= m <= 3n = T[n, m] = T[n-1, m]+T[n-1, m-1]+T[n-1, m-3];
    T[, ] = 0;
    Table[T[n, m], {n, 0, 7}, {m, 0, 3n}] // Flatten (* Jean-François Alcover, Sep 10 2018 *)

Formula

T(n, m) = T(n-1, m) + T(n-1, m-1) + T(n-1, m-3).
G.f.: Sum T(n, m)*z^n*w^m = 1/(1-z(1+w+w^3)). Hence m-th column is a polynomial in n of degree m given by C(n, m) + C(m-2, 1)*C(n, m-2) + C(m-4, 2)*C(n, m-4) + C(m-6, 3)*C(n, m-6) + ... E.g. column 5 is C(n, 5)+3C(n, 3). - N. J. A. Sloane, May 24 2005