A108561 Triangle read by rows: T(n,0)=1, T(n,n)=(-1)^n, T(n+1,k)=T(n,k-1)+T(n,k) for 0 < k < n.
1, 1, -1, 1, 0, 1, 1, 1, 1, -1, 1, 2, 2, 0, 1, 1, 3, 4, 2, 1, -1, 1, 4, 7, 6, 3, 0, 1, 1, 5, 11, 13, 9, 3, 1, -1, 1, 6, 16, 24, 22, 12, 4, 0, 1, 1, 7, 22, 40, 46, 34, 16, 4, 1, -1, 1, 8, 29, 62, 86, 80, 50, 20, 5, 0, 1, 1, 9, 37, 91, 148, 166, 130, 70, 25, 5, 1, -1, 1, 10, 46, 128, 239, 314, 296, 200, 95, 30, 6, 0, 1, 1, 11, 56, 174, 367
Offset: 0
Examples
From _Philippe Deléham_, Nov 17 2013: (Start) Triangle begins: 1; 1, -1; 1, 0, 1; 1, 1, 1, -1; 1, 2, 2, 0, 1; 1, 3, 4, 2, 1, -1; 1, 4, 7, 6, 3, 0, 1; (End)
Links
- Reinhard Zumkeller, Rows n = 0..125 of triangle, flattened
- C. Merino, S. D. Noble, M. Ramirez-Ibanez, R. Villarroel-Flores, On the structure of the h-vector of a paving matroid, Eur. J. Comb. 33, No. 8, 1787-1799 (2012).
- Index entries for triangles and arrays related to Pascal's triangle
Crossrefs
Programs
-
GAP
Flat(List([0..13],n->List([0..n],k->Sum([0..k],i->Binomial(n,i)*(-2)^(k-i))))); # Muniru A Asiru, Feb 19 2018
-
Haskell
a108561 n k = a108561_tabl !! n !! k a108561_row n = a108561_tabl !! n a108561_tabl = map reverse a112465_tabl -- Reinhard Zumkeller, Jan 03 2014
-
Maple
A108561 := (n, k) -> add(binomial(n, i)*(-2)^(k-i), i = 0..k): seq(seq(A108561(n,k), k = 0..n), n = 0..12); # Peter Bala, Feb 18 2018
-
Mathematica
Clear[t]; t[n_, 0] = 1; t[n_, n_] := t[n, n] = (-1)^Mod[n, 2]; t[n_, k_] := t[n, k] = t[n-1, k] + t[n-1, k-1]; Table[t[n, k], {n, 0, 13}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 06 2013 *)
-
Sage
def A108561_row(n): @cached_function def prec(n, k): if k==n: return 1 if k==0: return 0 return -prec(n-1,k-1)-sum(prec(n,k+i-1) for i in (2..n-k+1)) return [(-1)^k*prec(n, k) for k in (1..n-1)]+[(-1)^(n+1)] for n in (1..12): print(A108561_row(n)) # Peter Luschny, Mar 16 2016
Formula
G.f.: (1-y*x)/(1-x-(y+y^2)*x). - Philippe Deléham, Nov 17 2013
T(n,k) = T(n-1,k) + T(n-2,k-1) + T(n-2,k-2), T(0,0)=T(1,0)=1, T(1,1)=-1, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Nov 17 2013
From Peter Bala, Feb 18 2018: (Start)
T(n,k) = Sum_{i = 0..k} binomial(n,i)*(-2)^(k-i), 0 <= k <= n.
The n-th row polynomial is the n-th degree Taylor polynomial of the rational function (1 + x)^n/(1 + 2*x) about 0. For example, for n = 4, (1 + x)^4/(1 + 2*x) = 1 + 2*x + 2*x^2 + x^4 + O(x^5). (End)
Extensions
Definition corrected by Philippe Deléham, Dec 26 2013
Comments