%I #31 Apr 08 2024 09:25:37
%S 1,1,1,1,3,1,1,5,5,1,1,7,11,7,1,1,9,19,19,9,1,1,11,29,39,29,11,1,1,13,
%T 41,69,69,41,13,1,1,15,55,111,139,111,55,15,1,1,17,71,167,251,251,167,
%U 71,17,1,1,19,89,239,419,503,419,239,89,19,1,1,21,109,329,659,923,923,659,329,109,21,1
%N Triangle read by rows: T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 for 0<k<n, T(n,0) = T(n,n) = 1.
%C Eigensequence of the triangle = A001861. - _Gary W. Adamson_, Apr 17 2009
%H Reinhard Zumkeller, <a href="/A109128/b109128.txt">Rows n=0..150 of triangle, flattened</a>
%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F T(n,k) = T(n-1,k-1) + T(n-1,k) + 1 with T(n,0) = T(n,n) = 1.
%F Sum_{k=0..n} T(n, k) = A000325(n+1) (row sums).
%F T(n, k) = 2*binomial(n,k) - 1. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Sep 30 2007
%F T(n, 1) = 2*n - 1 = A005408(n+1) for n>0.
%F T(n, 2) = n^2 + n - 1 = A028387(n-2) for n>1.
%F T(n, k) = Sum_{j=0..n-k} C(n-k,j)*C(k,j)*(2 - 0^j) for k <= n. - _Paul Barry_, Apr 27 2006
%F T(n,k) = A014473(n,k) + A007318(n,k), 0 <= k <= n. - _Reinhard Zumkeller_, Apr 10 2012
%F From _G. C. Greubel_, Apr 06 2024: (Start)
%F T(n, n-k) = T(n, k).
%F T(2*n, n) = A134760(n).
%F T(2*n-1, n) = A030662(n), for n >= 1.
%F Sum_{k=0..n-1} T(n, k) = A000295(n+1), for n >= 1.
%F Sum_{k=0..n} (-1)^k*T(n, k) = 2*[n=0] - A000035(n+1).
%F Sum_{k=0..n-1} (-1)^k*T(n, k) = A327767(n), for n >= 1.
%F Sum_{k=0..floor(n/2)} T(n-k, k) = A281362(n).
%F Sum_{k=0..floor((n-1)/2)} T(n-k, k) = A281362(n-1) - (1+(-1)^n)/2 for n >= 1.
%F Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = b(n), where b(n) is the repeating pattern {1,1,0,-2,-3,-1,2,2,-1,-3,-2,0} with b(n) = b(n-12). (End)
%e Triangle begins as:
%e 1;
%e 1 1;
%e 1 3 1;
%e 1 5 5 1;
%e 1 7 11 7 1;
%e 1 9 19 19 9 1;
%e 1 11 29 39 29 11 1;
%e 1 13 41 69 69 41 13 1;
%e 1 15 55 111 139 111 55 15 1;
%e 1 17 71 167 251 251 167 71 17 1;
%e 1 19 89 239 419 503 419 239 89 19 1;
%p A109128 := proc(n,k)
%p 2*binomial(n,k)-1 ;
%p end proc: # _R. J. Mathar_, Jul 12 2016
%t Table[2*Binomial[n,k] -1, {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Mar 12 2020 *)
%o (Haskell)
%o a109128 n k = a109128_tabl !! n !! k
%o a109128_row n = a109128_tabl !! n
%o a109128_tabl = iterate (\row -> zipWith (+)
%o ([0] ++ row) (1 : (map (+ 1) $ tail row) ++ [0])) [1]
%o -- _Reinhard Zumkeller_, Apr 10 2012
%o (Magma) [2*Binomial(n,k) -1: k in [0..n], n in [0..12]]; // _G. C. Greubel_, Mar 12 2020
%o (Sage) [[2*binomial(n,k) -1 for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Mar 12 2020
%Y Cf. A000035, A000295, A001861, A005408, A014473, A028387, A030662.
%Y Cf. A134760, A281362, A327767.
%Y Cf. A000325 (row sums).
%Y Sequence m*binomial(n,k) - (m-1): A007318 (m=1), this sequence (m=2), A131060 (m=3), A131061 (m=4), A131063 (m=5), A131065 (m=6), A131067 (m=7), A168625 (m=8).
%K nonn,tabl
%O 0,5
%A _Reinhard Zumkeller_, Jun 20 2005
%E Offset corrected by _Reinhard Zumkeller_, Apr 10 2012