login
Triangle read by rows: T(n,k) = binomial(n - 1, k - 1), 1 <= k <= n, and T(n,0) = A153881(n+1), n >= 0.
1

%I #19 Apr 22 2024 13:34:25

%S 1,-1,1,-1,1,1,-1,1,2,1,-1,1,3,3,1,-1,1,4,6,4,1,-1,1,5,10,10,5,1,-1,1,

%T 6,15,20,15,6,1,-1,1,7,21,35,35,21,7,1,-1,1,8,28,56,70,56,28,8,1,-1,1,

%U 9,36,84,126,126,84,36,9,1,-1,1,10,45,120,210,252,210,120,45,10,1

%N Triangle read by rows: T(n,k) = binomial(n - 1, k - 1), 1 <= k <= n, and T(n,0) = A153881(n+1), n >= 0.

%C Row sums yield A000225 preceded by 1.

%C Except for signs, this is A135225.

%H G. C. Greubel, <a href="/A177767/b177767.txt">Rows n = 0..50 of the triangle, flattened</a>

%F Row n = coefficients in the expansion of x*(1 + x)^(n - 1) - 1, n > 0.

%F From _Franck Maminirina Ramaharo_, Oct 23 2018: (Start)

%F G.f.: (1 - 3*y + (2 + x)*y^2)/(1 - (2 + x)*y + (1 + x)*y^2).

%F E.g.f.: (2 + x - (1 + x)*exp(y) + x*exp((1 + x)*y))/(1 + x). (End)

%F From _G. C. Greubel_, Apr 22 2024: (Start)

%F Sum_{k=0..n} (-1)^k*T(n, k) = A153881(n+1) - [n=1].

%F Sum_{k=0..floor(n/2)} T(n-k, k) = A000071(n-1) + [n=0].

%F Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = -A131026(n-1) + [n=0]. (End)

%e Triangle begins:

%e 1;

%e -1, 1;

%e -1, 1, 1;

%e -1, 1, 2, 1;

%e -1, 1, 3, 3, 1;

%e -1, 1, 4, 6, 4, 1;

%e -1, 1, 5, 10, 10, 5, 1;

%e -1, 1, 6, 15, 20, 15, 6, 1;

%e -1, 1, 7, 21, 35, 35, 21, 7, 1;

%e -1, 1, 8, 28, 56, 70, 56, 28, 8, 1;

%e -1, 1, 9, 36, 84, 126, 126, 84, 36, 9, 1;

%e ...

%t Flatten[Table[If[n == 0, {1}, CoefficientList[x*(1 + x)^( n - 1) - 1, x]], {n, 0, 10}]]

%o (Maxima)

%o T(n, k) := if k = 0 then 2*floor(1/(n + 1)) - 1 else binomial(n - 1, k - 1)$

%o create_list(T(n, k), n, 0, 12, k, 0, n); /* _Franck Maminirina Ramaharo_, Oct 23 2018 */

%o (Magma)

%o A177767:= func< n,k | k eq n select 1 else k eq 0 select -1 else Binomial(n-1, k-1) >;

%o [A177767(n,k): k in [0..n], n in [0..13]]; // _G. C. Greubel_, Apr 22 2024

%o (SageMath)

%o flatten([[binomial(n-1, k-1) - int(k==0) + 2*int(n==0) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Apr 22 2024

%Y Cf. A000225, A000071, A007318, A014473, A097805, A131026, A135225.

%K sign,tabl,easy

%O 0,9

%A _Roger L. Bagula_, May 13 2010

%E Edited and new name by _Franck Maminirina Ramaharo_, Oct 23 2018