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.

A231599 T(n,k) is the coefficient of x^k in Product_{i=1..n} (1-x^i); triangle T(n,k), n >= 0, 0 <= k <= A000217(n), read by rows.

Original entry on oeis.org

1, 1, -1, 1, -1, -1, 1, 1, -1, -1, 0, 1, 1, -1, 1, -1, -1, 0, 0, 2, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 1, 1, -1, -1, -1, 0, 0, 1, 1, -1, 1, -1, -1, 0, 0, 1, 0, 2, 0, -1, -1, -1, -1, 0, 2, 0, 1, 0, 0, -1, -1, 1, 1, -1, -1, 0, 0, 1, 0, 1, 1, 0, -1, -1, -2, 0
Offset: 0

Views

Author

Marc Bogaerts, Nov 11 2013

Keywords

Comments

From Tilman Piesk, Feb 21 2016: (Start)
The sum of each row is 0. The even rows are symmetric; in the odd rows numbers with the same absolute value and opposed signum are symmetric to each other.
The odd rows where n mod 4 = 3 have the central value 0.
The even rows where n mod 4 = 0 have positive central values. They form the sequence A269298 and are also the rows maximal values.
A086376 contains the maximal values of each row, A160089 the maximal absolute values, and A086394 the absolute parts of the minimal values.
Rows of this triangle can be used to efficiently calculate values of A026807.
(End)

Examples

			For n=2 the corresponding polynomial is (1-x)*(1-x^2) = 1 -x - x^2 + x^3.
Irregular triangle starts:
  k    0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
n
0      1
1      1  -1
2      1  -1  -1   1
3      1  -1  -1   0   1   1  -1
4      1  -1  -1   0   0   2   0   0  -1  -1   1
5      1  -1  -1   0   0   1   1   1  -1  -1  -1   0   0   1   1  -1
		

Crossrefs

Cf. A000217 (triangular numbers).
Cf. A086376, A160089, A086394 (maxima, etc.).
Cf. A269298 (central nonzero values).

Programs

  • Maple
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))
            (expand(mul(1-x^i, i=1..n))):
    seq(T(n), n=0..10);  # Alois P. Heinz, Dec 22 2013
  • Mathematica
    Table[If[k == 0, 1, Coefficient[Product[(1 - x^i), {i, n}], x^k]], {n, 0, 6}, {k, 0, (n^2 + n)/2}] // Flatten (* Michael De Vlieger, Mar 04 2018 *)
  • PARI
    row(n) = pol = prod(i=1, n, 1 - x^i); for (i=0, poldegree(pol), print1(polcoeff(pol, i), ", ")); \\ Michel Marcus, Dec 21 2013
    
  • Python
    from sympy import poly, symbols
    def a231599_row(n):
        if n == 0:
            return [1]
        x = symbols('x')
        p = 1
        for i in range(1, n+1):
            p *= poly(1-x**i)
        p = p.all_coeffs()
        return p[::-1]
    # Tilman Piesk, Feb 21 2016

Formula

T(n,k) = [x^k] Product_{i=1..n} (1-x^i).
T(n,k) = T(n-1, k) + (-1)^n*T(n-1, n*(n+1)/2-k), n > 1. - Gevorg Hmayakyan, Feb 09 2017 [corrected by Giuliano Cabrele, Mar 02 2018]