%I #11 Sep 01 2023 04:10:59
%S 1,2,4,6,12,22,44,86,172,342,684,1366,2732,5462,10924,21846,43692,
%T 87382,174764,349526,699052,1398102,2796204,5592406,11184812,22369622,
%U 44739244,89478486,178956972,357913942,715827884,1431655766,2863311532,5726623062,11453246124,22906492246,45812984492
%N Row sums of triangle A135230.
%H G. C. Greubel, <a href="/A135231/b135231.txt">Table of n, a(n) for n = 0..500</a>
%F a(2*n+1) = A005578(n+1) if n is odd.
%F Conjectures from _Chai Wah Wu_, Aug 31 2023: (Start)
%F a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 3.
%F G.f.: (-2*x^3 - x^2 + 1)/((x - 1)*(x + 1)*(2*x - 1)). (End)
%e a(3) = 6 = sum of row 4 terms of triangle A135230; (1 + 2 + 2 + 1).
%e a(5) = 22 = A005578(6).
%e a(6) = 44 = A005578(7) + 1.
%p T:= proc(n, k) option remember;
%p if k=n then 1
%p elif k=0 then (3+(-1)^n)/2
%p else add(binomial(n-2*j-1, k-1), j=0..floor((n-1)/2))
%p fi; end:
%p seq( add(T(n, j), j=0..n), n=0..40); # _G. C. Greubel_, Nov 20 2019
%t T[n_, k_]:= T[n, k]= If[k==n, 1, If[k==0, (3+(-1)^n)/2, Sum[Binomial[n-1 - 2*j, k-1], {j, 0, Floor[(n-1)/2]}]]]; Table[Sum[T[n, j], {j, 0, n}], {n, 0, 40}] (* _G. C. Greubel_, Nov 20 2019 *)
%o (PARI) T(n,k) = if(k==n, 1, if(k==0, (3+(-1)^n)/2, sum(j=0, (n-1)\2, binomial( n-2*j-1, k-1)) )); \\ _G. C. Greubel_, Nov 20 2019
%o (Magma)
%o function T(n,k)
%o if k eq n then return 1;
%o elif k eq 0 then return (3+(-1)^n)/2;
%o else return (&+[Binomial(n-2*j-1, k-1): j in [0..Floor((n-1)/2)]]);
%o end if; return T; end function;
%o [(&+[T(n,j): j in [0..n]]): n in [0..40]]; // _G. C. Greubel_, Nov 20 2019
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k==n): return 1
%o elif (k==0): return (3+(-1)^n)/2
%o else: return sum(binomial(n-2*j-1, k-1) for j in (0..floor((n-1)/2)))
%o [sum(T(n, j) for j in (0..n)) for n in (0..40)] # _G. C. Greubel_, Nov 20 2019
%Y Cf. A005578, A135230.
%K nonn
%O 0,2
%A _Gary W. Adamson_, Nov 23 2007
%E Terms a(16) onward added and offset changed by _G. C. Greubel_, Nov 20 2019