login
Triangle defined by T(n+1, k) = T(n, k-1) + T(n-1, k), T(n,1) = 1, T(1,k) = 1, T(2,k) = min(2,k).
15

%I #29 Oct 22 2024 03:14:38

%S 1,1,2,1,2,3,1,3,4,5,1,3,6,7,8,1,4,7,11,12,13,1,4,10,14,19,20,21,1,5,

%T 11,21,26,32,33,34,1,5,15,25,40,46,53,54,55,1,6,16,36,51,72,79,87,88,

%U 89,1,6,21,41,76,97,125,133,142,143,144,1,7,22,57,92,148,176,212,221,231,232,233

%N Triangle defined by T(n+1, k) = T(n, k-1) + T(n-1, k), T(n,1) = 1, T(1,k) = 1, T(2,k) = min(2,k).

%H G. C. Greubel, <a href="/A011794/b011794.txt">Rows n = 1..100 of the triangle, flattened</a>

%H D. J. Broadhurst, <a href="http://arXiv.org/abs/hep-th/9604128">On the enumeration of irreducible k-fold Euler sums and their roles in knot theory and field theory</a>, arXiv:hep-th/9604128, 1996.

%F T(n,n) = Fibonacci(n+1). - _Jean-François Alcover_, Feb 26 2013

%F From _G. C. Greubel_, Oct 21 2024: (Start)

%F Sum_{k=1..n} T(n, k) = A131913(n-1).

%F Sum_{k=1..n} (-1)^(k-1)*T(n, k) = A039834(n).

%F Sum_{k=1..floor((n+1)/2))} T(n-k+1,k) = (1/2)*((1-(-1)^n)*A074878((n+3)/2) + (1+(-1)^n)*A008466((n+6)/2)) (diagonal row sums).

%F Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1,k) = (-1)^floor((n-1)/2)*A103609(n) + [n=1] (signed diagonal row sums). (End)

%e matrix(10,10,n,k,a(n-1,k-1))

%e [ 0 0 0 0 0 0 0 0 0 0 ]

%e [ 0 1 1 1 1 1 1 1 1 1 ]

%e [ 0 1 2 2 2 2 2 2 2 2 ]

%e [ 0 1 2 3 3 3 3 3 3 3 ]

%e [ 0 1 3 4 5 5 5 5 5 5 ]

%e [ 0 1 3 6 7 8 8 8 8 8 ]

%e Triangle begins as:

%e 1;

%e 1, 2;

%e 1, 2, 3;

%e 1, 3, 4, 5;

%e 1, 3, 6, 7, 8;

%e 1, 4, 7, 11, 12, 13;

%e 1, 4, 10, 14, 19, 20, 21;

%e 1, 5, 11, 21, 26, 32, 33, 34;

%e 1, 5, 15, 25, 40, 46, 53, 54, 55;

%e 1, 6, 16, 36, 51, 72, 79, 87, 88, 89;

%t T[n_, k_]:= T[n, k]= T[n-1, k-1] + T[n-2, k]; T[n_, 1] = 1; T[1, k_] = 1; T[2, k_] := Min[2, k]; Table[T[n, k], {n,15}, {k,n}]//Flatten (* _Jean-François Alcover_, Feb 26 2013 *)

%o (PARI) T(n,k)=if(n<=0 || k<=0,0, if(n<=2 || k==1, min(n,k), T(n-1,k-1)+T(n-2,k)))

%o (Magma)

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

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

%o elif n eq 2 then return Min(2, k);

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

%o end if;

%o end function;

%o [T(n,k): k in [1..n], n in [1..15]]; // _G. C. Greubel_, Oct 21 2024

%o (SageMath)

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

%o if (k==1 or n==1): return 1

%o elif (n==2): return min(2,k)

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

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

%Y Columns include A008619 and (essentially) A055802, A055803, A055804, A055805, A055806.

%Y Right-hand columns 1-14 are A000045, A000071, A001911, A001924, A001891, A014162, A053808, A014166, A053809, A053739, A054469, A053295, A054470, A053296.

%Y Essentially a reflected version of A055801.

%Y Sums include: A039834 (signed row), A131913 (row).

%Y Cf. A008466, A074878, A103609.

%K nonn,tabl

%O 1,3

%A _N. J. A. Sloane_ and _David Broadhurst_

%E Entry improved by comments from _Michael Somos_

%E More terms added by _G. C. Greubel_, Oct 21 2024