login
Triangle read by rows: T(n,k) = A000129( 1 + min(k,n-k) ), n>=0, 0<=k<=n.
2

%I #13 May 17 2021 04:33:12

%S 1,1,1,1,2,1,1,2,2,1,1,2,5,2,1,1,2,5,5,2,1,1,2,5,12,5,2,1,1,2,5,12,12,

%T 5,2,1,1,2,5,12,29,12,5,2,1,1,2,5,12,29,29,12,5,2,1,1,2,5,12,29,70,29,

%U 12,5,2,1,1,2,5,12,29,70,70,29,12,5,2,1,1,2,5,12,29,70,169,70,29,12,5,2,1

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

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

%F Sum_{k=0..n} T(n,k) = A238375(n). - _Philippe Deléham_, Feb 27 2014

%F T(2*n,n) = A000129(n+1). - _Philippe Deléham_, Feb 27 2014

%e Triangle begins as:

%e 1;

%e 1, 1;

%e 1, 2, 1;

%e 1, 2, 2, 1;

%e 1, 2, 5, 2, 1;

%e 1, 2, 5, 5, 2, 1;

%e 1, 2, 5, 12, 5, 2, 1;

%e 1, 2, 5, 12, 12, 5, 2, 1;

%e 1, 2, 5, 12, 29, 12, 5, 2, 1;

%e 1, 2, 5, 12, 29, 29, 12, 5, 2, 1;

%e 1, 2, 5, 12, 29, 70, 29, 12, 5, 2, 1;

%t (* First program *)

%t Pell[n_]:= Pell[n]= If[n<2, n, 2*Pell[n-1] + Pell[n-2]];

%t T[n_, k_]:= Pell[1 + Min[k, n-k]];

%t Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* modified by _G. C. Greubel_, May 15 2021 *)

%t (* Second program *)

%t Table[Fibonacci[1 +Min[k, n-k], 2], {n,0,15}, {k,0,n}]//Flatten (* _G. C. Greubel_, May 15 2021 *)

%o (Sage)

%o def Pell(n): return n if (n<2) else 2*Pell(n-1) + Pell(n-2)

%o def T(n,k): return Pell(1+min(k,n-k))

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

%Y Cf. A000129, A238375 (row sums).

%K nonn,tabl

%O 0,5

%A _Roger L. Bagula_, Dec 11 2008

%E Better name by _Philippe Deléham_, Feb 27 2014