%I #16 Jun 25 2024 01:30:56
%S 1,1,2,1,3,8,1,4,11,32,1,5,15,43,128,1,6,20,58,171,512,1,7,26,78,229,
%T 683,2048,1,8,33,104,307,912,2731,8192,1,9,41,137,411,1219,3643,10923,
%U 32768,1,10,50,178,548,1630,4862,14566,43691,131072
%N Pascal's triangle, but the last element of the row is the sum of all the previous terms.
%H G. C. Greubel, <a href="/A135299/b135299.txt">Table of n, a(n) for the first 25 rows</a>
%F T(0,0) = 1;
%F T(n,0) = 1;
%F T(n,k) = T(n-1, k-1) + T(n-1, k) if k < n;
%F T(n,n) = (Sum_{j=0..n-1} Sum_{i=0..j} T(j,i)) + Sum_{i=0..n-1} T(n,i) [i.e., sum of all earlier terms of the triangle].
%F T(n,n) = (4^n)/2 for n > 0;
%F T(n,n) = 2*Sum_{i=0..n-1} T(n,i).
%e T(2,1) = T(1,0) + T(1,1) = 1 + 2 = 3;
%e T(2,2) = T(0,0) + T(1,0) + T(1,1) + T(2,0) + T(2,1) = 1 + 1 + 2 + 1 + 3 = 8.
%e From _G. C. Greubel_, Oct 09 2016: (Start)
%e The triangle is:
%e 1;
%e 1, 2;
%e 1, 3, 8;
%e 1, 4, 11, 32;
%e 1, 5, 15, 43, 128;
%e 1, 6, 20, 58, 171, 512;
%e ... (End)
%t T[0, 0] := 1; T[n_, 0] := 1; T[n_, k_] := T[n - 1, k] + T[n - 1, k - 1]; T[n_, n_] := 2^(2*n - 1); Table[T[n, k], {n, 0, 5}, {k, 0, n}] (* _G. C. Greubel_, Oct 09 2016 *)
%Y Cf. A007318, A067337.
%K nonn,tabl
%O 0,3
%A _Jose Ramon Real_, Dec 04 2007