%I #69 Jan 21 2023 01:39:15
%S 1,1,1,1,3,1,1,5,7,1,1,7,17,15,1,1,9,31,49,31,1,1,11,49,111,129,63,1,
%T 1,13,71,209,351,321,127,1,1,15,97,351,769,1023,769,255,1,1,17,127,
%U 545,1471,2561,2815,1793,511,1,1,19,161,799,2561,5503,7937,7423,4097,1023,1
%N Triangle read by rows: T(n,0) = T(n,n) = 1 and for 0<k<n: T(n,k) = 2*T(n-1, k-1) + T(n-1,k).
%C From _Richard M. Green_, Jul 26 2011: (Start)
%C T(n,n-k) is the (k-1)-st Betti number of the subcomplex of the n-dimensional half cube obtained by deleting the interiors of all half-cube shaped faces of dimension at least k.
%C T(n,n-k) is the (k-2)-nd Betti number of the complement of the k-equal real hyperplane arrangement in R^n.
%C T(n,n-k) gives a lower bound for the complexity of the problem of determining, given n real numbers, whether some k of them are equal.
%C T(n,n-k) is the number of nodes used by the Kronrod-Patterson-Smolyak cubature formula in numerical analysis. (End)
%H Reinhard Zumkeller, <a href="/A119258/b119258.txt">Rows n=0..120 of triangle, flattened</a>
%H A. Björner and V. Welker, <a href="http://dx.doi.org/10.1006/aima.1995.1012">The homology of "k-equal" manifolds and related partition lattices</a>, Adv. Math., 110 (1995), 277-313.
%H Nicolle González, Pamela E. Harris, Gordon Rojas Kirby, Mariana Smit Vega Garcia, and Bridget Eileen Tenner, <a href="https://arxiv.org/abs/2301.02628">Pinnacle sets of signed permutations</a>, arXiv:2301.02628 [math.CO], 2023.
%H R. M. Green, <a href="http://dx.doi.org/10.1016/j.aim.2008.11.019">Homology representations arising from the half cube</a>, Adv. Math., 222 (2009), 216-239.
%H R. M. Green, <a href="http://dx.doi.org/10.1016/j.jcta.2009.10.005">Homology representations arising from the half cube, II</a>, J. Combin. Theory Ser. A, 117 (2010), 1037-1048.
%H R. M. Green, <a href="http://arxiv.org/abs/0812.1208">Homology representations arising from the half cube, II</a>, arXiv:0812.1208 [math.RT], 2008.
%H R. M. Green and Jacob T. Harper, <a href="http://arxiv.org/abs/1107.4993">Morse matchings on polytopes</a>, arXiv preprint arXiv:1107.4993 [math.GT], 2011.
%H OEIS Wiki, <a href="http://oeis.org/wiki/Template:Sequence_of_the_Day_for_November_3">Sequence of the Day for November 3</a>.
%H K. Petras, <a href="http://dx.doi.org/10.1023/A:1018904816230">On the Smolyak cubature error for analytic functions</a>, Adv. Comput. Math., 12 (2000), 71-93.
%H M. Shattuck and T. Waldhauser, <a href="http://www.fq.math.ca/Papers1/48-4/Shattuck_Waldhauser.pdf">Proofs of some binomial identities using the method of last squares</a>, Fib. Q., 48 (2010), 290-297.
%H M. Shattuck and T. Waldhauser, <a href="http://arxiv.org/abs/1107.1063">Proofs of some binomial identities using the method of last squares</a>, arXiv:1107.1063 [math.CO], 2010.
%H <a href="/index/Pas#Pascal">Index entries for triangles and arrays related to Pascal's triangle</a>
%F T(2*n,n-1) = T(2*n-1,n) for n > 0;
%F central terms give A119259; row sums give A007051;
%F T(n,0) = T(n,n) = 1;
%F T(n,1) = A005408(n-1) for n > 0;
%F T(n,2) = A056220(n-1) for n > 1;
%F T(n,n-4) = A027608(n-4) for n > 3;
%F T(n,n-3) = A055580(n-3) for n > 2;
%F T(n,n-2) = A000337(n-1) for n > 1;
%F T(n,n-1) = A000225(n) for n > 0.
%F T(n,k) = [k<=n]*(-1)^k*Sum_{i=0..k} (-1)^i*C(k-n,k-i)*C(n,i). - _Paul Barry_, Sep 28 2007
%F From _Richard M. Green_, Jul 26 2011: (Start)
%F T(n,k) = [k<=n] Sum_{i=n-k..n} (-1)^(n-k-i)*2^(n-i)*C(n,i).
%F T(n,k) = [k<=n] Sum_{i=n-k..n} C(n,i)*C(i-1,n-k-1).
%F G.f. for T(n,n-k): x^k/(((1-2x)^k)*(1-x)). (End)
%F T(n,k) = R(n,k,2) where R(n, k, m) = (1-m)^(-n+k)-m^(k+1)*Pochhammer(n-k,k+1)* hyper2F1([1,n+1], [k+2], m)/(k+1)!. - _Peter Luschny_, Jul 25 2014
%F From _Peter Bala_, Mar 05 2018: (Start)
%F The n-th row polynomial R(n,x) equals the n-th degree Taylor polynomial of the function (1 + 2*x)^n/(1 + x) about 0. For example, for n = 4 we have (1 + 2*x)^4/(1 + x) = 1 + 7*x + 17*x^2 + 15*x^3 + x^4 + O(x^5).
%F Row reverse of A112857. (End)
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, 3, 1;
%e 1, 5, 7, 1;
%e 1, 7, 17, 15, 1;
%e 1, 9, 31, 49, 31, 1;
%p # Case m = 2 of the more general:
%p A119258 := (n,k,m) -> (1-m)^(-n+k)-m^(k+1)*pochhammer(n-k, k+1) *hypergeom([1,n+1],[k+2],m)/(k+1)!;
%p seq(seq(round(evalf(A119258(n,k,2))),k=0..n), n=0..10); # _Peter Luschny_, Jul 25 2014
%t T[n_, k_] := Binomial[n, k] Hypergeometric2F1[-k, n-k, n-k+1, -1];
%t Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Sep 10 2017 *)
%o (Haskell)
%o a119258 n k = a119258_tabl !! n !! k
%o a119258_row n = a119258_tabl !! n
%o a119258_list = concat a119258_tabl
%o a119258_tabl = iterate (\row -> zipWith (+)
%o ([0] ++ init row ++ [0]) $ zipWith (+) ([0] ++ row) (row ++ [0])) [1]
%o -- _Reinhard Zumkeller_, Nov 15 2011
%o (PARI) T(n,k) = if(k==0 || k==n, 1, 2*T(n-1, k-1) + T(n-1,k) ); \\ _G. C. Greubel_, Nov 18 2019
%o (Magma)
%o function T(n,k)
%o if k eq 0 or k eq n then return 1;
%o else return 2*T(n-1,k-1) + T(n-1,k);
%o end if;
%o return T;
%o end function;
%o [T(n,k): k in [0..n], n in [0..12]]; // _G. C. Greubel_, Nov 18 2019
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k==0 or k==n): return 1
%o else: return 2*T(n-1, k-1) + T(n-1, k)
%o [[T(n, k) for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Nov 18 2019
%Y Cf. A119259, A007318, A007051, A005408, A056220, A027608, A055580, A000337, A000225, A112857 (row reverse).
%Y A145661, A119258 and A118801 are all essentially the same (see the Shattuck and Waldhauser paper). - Tamas Waldhauser, Jul 25 2011
%K nonn,tabl,easy
%O 0,5
%A _Reinhard Zumkeller_, May 11 2006