login
Triangle T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise, read by rows.
16

%I #28 Jan 12 2024 22:43:22

%S 1,1,1,1,1,1,1,2,2,1,1,3,4,3,1,1,4,7,7,4,1,1,5,11,14,11,5,1,1,6,16,25,

%T 25,16,6,1,1,7,22,41,50,41,22,7,1,1,8,29,63,91,91,63,29,8,1,1,9,37,92,

%U 154,182,154,92,37,9,1,1,10,46,129,246,336,336,246,129,46,10,1,1,11,56,175,375,582,672,582,375,175,56,11,1

%N Triangle T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise, read by rows.

%C Starting 1,0,1,1,1,... this is the Riordan array ((1-x+x^2)/(1-x), x/(1-x)). Its diagonal sums are A006355. Its inverse is A106509. - _Paul Barry_, May 04 2005

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

%H Paul Barry, <a href="https://arxiv.org/abs/2104.01644">Centered polygon numbers, heptagons and nonagons, and the Robbins numbers</a>, arXiv:2104.01644 [math.CO], 2021.

%F T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise.

%F T(n, k) = T(n-1, k-1) + T(n-1, k) starting with T(2, 0) = T(2, 1) = T(2, 2) = 1 and T(n, 0) = T(n, n) = 1.

%F G.f.: (1-x^2*y) / (1 - x*(1+y)). - _Ralf Stephan_, Jan 31 2005

%F From _G. C. Greubel_, Apr 28 2021: (Start)

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

%F T(n, k, q) = q*[n=2] + Sum_{j=0..5} q^j*binomial(n-2*j, k-j)*[n>2*j] with T(n,0) = T(n,n) = 1 for q = -1. (End)

%e Rows start as:

%e 1;

%e 1, 1;

%e 1, 1, 1; (key row for starting the recurrence)

%e 1, 2, 2, 1;

%e 1, 3, 4, 3, 1;

%e 1, 4, 7, 7, 4, 1;

%e 1, 5, 11, 14, 11, 5, 1;

%t t[2, 1] = 1; t[n_, n_] = t[_, 0] = 1; t[n_, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Nov 28 2013, after _Ralf Stephan_ *)

%o (Magma)

%o T:= func< n,k | n lt 3 select 1 else Binomial(n,k) - Binomial(n-2,k-1) >;

%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Apr 28 2021

%o (Sage)

%o def T(n,k): return 1 if n<3 else binomial(n,k) - binomial(n-2,k-1)

%o flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # _G. C. Greubel_, Apr 28 2021

%o (PARI) A072405(n, k) = if(n>2, binomial(n, k)-binomial(n-2, k-1), 1) \\ _M. F. Hasler_, Jan 06 2024

%Y Row sums give essentially A003945, A007283, or A042950.

%Y Cf. A072406 for number of odd terms in each row.

%Y Cf. A051597, A096646, A122218 (identical for n > 1).

%Y Cf. A007318 (q=0), A072405 (q= -1), A173117 (q=1), A173118 (q=2), A173119 (q=3), A173120 (q=-4).

%K easy,nonn,tabl

%O 0,8

%A _Henry Bottomley_, Jun 16 2002