login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle read by rows: T(n,0) = T(n,n) = 1 for n >= 0, T(n,1) = T(n,n-1) = 2*n-1 for n >= 1, T(n,k) = T(n-1,k-1) + T(n-1,k) for 2 <= k <= n-2 and n >= 4.
16

%I #19 Jun 15 2024 02:14:34

%S 1,1,1,1,3,1,1,5,5,1,1,7,10,7,1,1,9,17,17,9,1,1,11,26,34,26,11,1,1,13,

%T 37,60,60,37,13,1,1,15,50,97,120,97,50,15,1,1,17,65,147,217,217,147,

%U 65,17,1,1,19,82,212,364,434,364,212,82,19,1

%N Triangle read by rows: T(n,0) = T(n,n) = 1 for n >= 0, T(n,1) = T(n,n-1) = 2*n-1 for n >= 1, T(n,k) = T(n-1,k-1) + T(n-1,k) for 2 <= k <= n-2 and n >= 4.

%C T(n, k) is the number of paths from (0, 0) to (n-k, k) in the directed graph having vertices (i, j) and edges (i, j)-to-(i+1, j) and (i, j)-to-(i, j+1) for i, j >= 0 and edges (i, j)-to-(i+1, j+1) for i=0, j >= 0 and for j=0, i >= 0.

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

%F Sum_{k=0..n} T(n, k) = A026622(n) (row sums).

%F From _G. C. Greubel_, Jun 13 2024: (Start)

%F T(n, n-k) = T(n, k).

%F T(n, 0) = A000012(n).

%F T(n, 1) = A005408(n-1), n >= 1.

%F T(n, 2) = A098749(n), n >= 2.

%F T(n, 3) = A145066(n-2) - [n=3], n >= 3.

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

%F Sum_{k=0..n} (-1)^k*T(n-k, k) = b(n-2) + 2*[n=0] + [n=1], where b(n) = (1/6)*(-2*sqrt(3)*sin(Pi*n/3) + 2*sqrt(3)*sin(5*Pi*n/3) + 3*cos(Pi* n/2) + 3*cos(3*Pi*n/2) - 6).

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

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 3, 1;

%e 1, 5, 5, 1;

%e 1, 7, 10, 7, 1;

%e 1, 9, 17, 17, 9, 1;

%e 1, 11, 26, 34, 26, 11, 1;

%e 1, 13, 37, 60, 60, 37, 13, 1;

%e 1, 15, 50, 97, 120, 97, 50, 15, 1;

%e 1, 17, 65, 147, 217, 217, 147, 65, 17, 1;

%e 1, 19, 82, 212, 364, 434, 364, 212, 82, 19, 1;

%t T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[k==1 || k==n-1, 2*n-1, T[n-1, k -1] + T[n-1,k]]];

%t Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Jun 13 2024 *)

%o (Magma)

%o function T(n,k) // T = A026615

%o if k eq 0 or k eq n then return 1;

%o elif k eq 1 or k eq n-1 then return 2*n-1;

%o else return T(n-1, k-1) + T(n-1, k);

%o end if;

%o end function;

%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Jun 13 2024

%o (SageMath)

%o def T(n,k): # T = A026615

%o if k==0 or k==n: return 1

%o elif k==1 or k==n-1: return 2*n-1

%o else: return T(n-1, k-1) + T(n-1, k)

%o flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # _G. C. Greubel_, Jun 13 2024

%Y Cf. A026616, A026617, A026618, A026619, A026620, A026621, A026623.

%Y Cf. A026624, A026956, A026957, A026958, A026959, A026960.

%Y Cf. A000012, A005408, A098749, A145066, A176742.

%Y Cf. A026622 (row sums), A026625 (diagonal sums).

%K nonn,tabl

%O 0,5

%A _Clark Kimberling_

%E Offset corrected by _G. C. Greubel_, Jun 13 2024