%I #16 Feb 10 2022 09:38:40
%S 1,2,5,11,26,58,136,306,717,1625,3813,8697,20451,46909,110563,254855,
%T 602042,1393746,3299304,7666786,18182976,42391546,100704606,235452416,
%U 560147414,1312916040,3127406812,7346213746,17518138314,41228281888,98408997716,231990850378,554207752781,1308436686305,3128033585157
%N a(n) = Sum_{k=0..n} T(n,k), T given by A026780.
%H G. C. Greubel, <a href="/A026787/b026787.txt">Table of n, a(n) for n = 0..1000</a>
%F O.g.f.: F(x^2)*(1/(1-x*S(x^2))+C(x^2)*x/(1-x*C(x^2))), where C(x)=(1-sqrt(1-4x))/(2*x) is o.g.f. for A000108, S(x)=(1-x-sqrt(1-6*x+x^2))/(2*x) is o.g.f. for A006318, and F(x)=S(x)/(1-x*C(x)*S(x)) is o.g.f. for A026781. - _Max Alekseyev_, Jan 13 2015
%F C(x^2)/(1-x*C(x^2)) above is the o.g.f. for A001405. 1/(1-x*S(x^2)) above is the o.g.f for A026003 starting with an additional 1: 1,1,1,3,5,13,25,... - _R. J. Mathar_, Feb 10 2022
%p T:= proc(n,k) option remember;
%p if n<0 then 0;
%p elif k=0 or k =n then 1;
%p elif k <= n/2 then
%p procname(n-1,k-1)+procname(n-2,k-1)+procname(n-1,k) ;
%p else
%p procname(n-1,k-1)+procname(n-1,k) ;
%p fi ;
%p end proc:
%p seq( add(T(n,k), k=0..n), n=0..30); # _G. C. Greubel_, Nov 02 2019
%t T[n_, k_]:= T[n, k]= If[n<0, 0, If[k==0 || k==n, 1, If[k<=n/2, T[n-1, k-1] + T[n-2, k-1] + T[n-1, k], T[n-1, k-1] + T[n-1, k] ]]];
%t Table[Sum[T[n, k], {k,0,n}], {n,0,30}] (* _G. C. Greubel_, Nov 02 2019 *)
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (n<0): return 0
%o elif (k==0 or k==n): return 1
%o elif (k<=n/2): return T(n-1,k-1) + T(n-2,k-1) + T(n-1,k)
%o else: return T(n-1,k-1) + T(n-1,k)
%o [sum(T(n,k) for k in (0..n)) for n in (0..30)] # _G. C. Greubel_, Nov 02 2019
%Y Cf. A026780, A026781, A026782, A026783, A026784, A026785, A026786, A026788, A026789, A026790.
%K nonn
%O 0,2
%A _Clark Kimberling_
%E More terms from _Max Alekseyev_, Jan 13 2015