%I #8 Sep 08 2022 08:45:41
%S 2,1,1,2,0,2,1,3,3,1,2,0,12,0,2,1,5,10,10,5,1,2,0,30,0,30,0,2,1,7,21,
%T 35,35,21,7,1,2,0,56,0,140,0,56,0,2,1,9,36,84,126,126,84,36,9,1,2,0,
%U 90,0,420,0,420,0,90,0,2,1,11,55,165,330,462,462,330,165,55,11,1
%N Triangle read by rows: T(n, k) = f(n, k) + f(n, n-k), where f(n, k) = binomial(n, k)*(1 + (-1)^k)/2.
%C Row sums are: {2, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024,...}
%H G. C. Greubel, <a href="/A155997/b155997.txt">Rows n = 0..100 of triangle, flattened</a>
%F T(n, k) = f(n, k) + f(n, n-k), where f(n, k) = binomial(n, k)*(1 + (-1)^k)/2.
%F From _G. C. Greubel_, Dec 01 2019: (Start)
%F T(n, k) = binomial(n, k)*(2 + (-1)^k*(1 + (-1)^n))/2.
%F Sum_{k=0..n} T(n,k) = 2^n for n >= 1.
%F Sum_{k=0..n-1} T(n,k) = (2^(n+1) - 3 - (-1)^n)/2 = A140253(n), n >= 2. (End)
%e Triangle begins as:
%e 2;
%e 1, 1;
%e 2, 0, 2;
%e 1, 3, 3, 1;
%e 2, 0, 12, 0, 2;
%e 1, 5, 10, 10, 5, 1;
%e 2, 0, 30, 0, 30, 0, 2;
%e 1, 7, 21, 35, 35, 21, 7, 1;
%e 2, 0, 56, 0, 140, 0, 56, 0, 2;
%e 1, 9, 36, 84, 126, 126, 84, 36, 9, 1;
%e 2, 0, 90, 0, 420, 0, 420, 0, 90, 0, 2;
%p seq(seq( binomial(n, k)*(2+(-1)^k*(1+(-1)^n))/2, k=0..n), n=0..12); # _G. C. Greubel_, Dec 01 2019
%t f[n_, k_]:= (Binomial[n, k] + (-1)^k*Binomial[n, k])/2; Table[f[n,k]+f[n,n-k], {n,0,10}, {k,0,n}]//Flatten
%t Table[Binomial[n, k]*(2+(-1)^k*(1+(-1)^n))/2, {n,0,12}, {k,0,n}]//Flatten (* _G. C. Greubel_, Dec 01 2019 *)
%o (PARI) T(n,k) = binomial(n, k)*(2 + (-1)^k*(1 + (-1)^n))/2; \\ _G. C. Greubel_, Dec 01 2019
%o (Magma) [Binomial(n, k)*(2+(-1)^k*(1+(-1)^n))/2: k in [0..n], n in [0..12]]; // _G. C. Greubel_, Dec 01 2019
%o (Sage) [[binomial(n, k)*(2+(-1)^k*(1+(-1)^n))/2 for k in (0..n)] for n in (0..12)] # _G. C. Greubel_, Dec 01 2019
%o (GAP) Flat(List([0..12], n-> List([0..n], k-> Binomial(n, k)*(2 + (-1)^k*(1 + (-1)^n))/2 ))); # _G. C. Greubel_, Dec 01 2019
%K nonn,tabl
%O 0,1
%A _Roger L. Bagula_, Feb 01 2009