login
Riordan array ((1-2*x-x^2)/(1-x), x/(1-x)).
2

%I #25 Sep 08 2022 08:45:44

%S 1,-1,1,-2,0,1,-2,-2,1,1,-2,-4,-1,2,1,-2,-6,-5,1,3,1,-2,-8,-11,-4,4,4,

%T 1,-2,-10,-19,-15,0,8,5,1,-2,-12,-29,-34,-15,8,13,6,1,-2,-14,-41,-63,

%U -49,-7,21,19,7,1,-2,-16,-55,-104,-112,-56,14,40,26,8,1

%N Riordan array ((1-2*x-x^2)/(1-x), x/(1-x)).

%C The matrix inverse starts

%C 1;

%C 1, 1;

%C 2, 0, 1;

%C 2, 2, -1, 1;

%C 4, 0, 3, -2, 1;

%C 4, 4, -3, 5, -3, 1;

%C 8, 0, 7, -8, 8, -4, 1;

%C 8, 8, -7, 15, -16, 12, -5, 1;

%C 16, 0, 15, -22, 31, -28, 17, -6, 1;

%C 16, 16, -15, 37, -53, 59, -45, 23, -7, 1;

%C 32, 0, 31, -52, 90, -112, 104, -68, 30, -8, 1;

%C - _R. J. Mathar_, Mar 29 2013

%H Muniru A Asiru, <a href="/A159855/b159855.txt">Table of n, a(n) for n = 0..5151</a>

%F T(n,k) = C(n,n-k) - 2*C(n-1,n-k-1) - C(n-2,n-k-2), where C(n,k) = n!/(k!*(n-k)!) for 0 <= k <= n, otherwise 0. - _Peter Bala_, Mar 20 2018

%e Triangle begins:

%e 1;

%e -1, 1;

%e -2, 0, 1;

%e -2, -2, 1, 1;

%e -2, -4, -1, 2, 1;

%e -2, -6, -5, 1, 3, 1;

%p C := proc (n, k) if 0 <= k and k <= n then factorial(n)/(factorial(k)*factorial(n-k)) else 0 end if end proc:

%p for n from 0 to 10 do

%p seq(C(n, n-k)-2*C(n-1, n-k-1)-C(n-2, n-k-2), k = 0..n)

%p end do; # _Peter Bala_, Mar 20 2018

%t (* The function RiordanArray is defined in A256893. *)

%t RiordanArray[(1 - 2 # - #^2)/(1 - #)&, #/(1 - #)&, 11] // Flatten (* _Jean-François Alcover_, Jul 16 2019 *)

%o (Sage) # uses[riordan_array from A256893]

%o riordan_array((1-2*x-x^2)/(1-x), x/(1-x), 8) # _Peter Luschny_, Mar 21 2018

%o (GAP) Flat(List([0..12],n->List([0..n],k->Binomial(n,n-k)-2*Binomial(n-1,n-k-1)-Binomial(n-2,n-k-2)))); # _Muniru A Asiru_, Mar 22 2018

%o (Magma) /* As triangle */ [[Binomial(n, n-k)-2*Binomial(n-1, n-k-1)-Binomial(n-2, n-k-2): k in [0..n]]: n in [0.. 15]]; // _Vincenzo Librandi_, Mar 22 2018

%Y Cf. A159854.

%K easy,sign,tabl

%O 0,4

%A _Philippe Deléham_, Apr 24 2009

%E Two data values in row 10 corrected by _Peter Bala_, Mar 20 2018