login
a(n) = Sum{k=0..n} T(n,k), T given by A026747.
11

%I #9 Oct 29 2019 21:10:04

%S 1,2,5,10,24,48,114,228,540,1080,2558,5116,12133,24266,57658,115316,

%T 274600,549200,1310817,2621634,6271788,12543576,30076629,60153258,

%U 144550655,289101310,696176322,1392352644,3359516328

%N a(n) = Sum{k=0..n} T(n,k), T given by A026747.

%H G. C. Greubel, <a href="/A026754/b026754.txt">Table of n, a(n) for n = 0..1000</a>

%p A026747 := proc(n,k) option remember;

%p if k=0 or k = n then 1;

%p elif type(n,'even') and 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 end if ;

%p end proc:

%p seq(add(A026747(n,k), k=0..n), n=0..30); # _G. C. Greubel_, Oct 29 2019

%t T[n_, k_]:= T[n, k]= If[k==0 || k==n, 1, If[EvenQ[n] && 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] ]]; Table[Sum[T[n, k],{k,0,n}], {n,0,30}] (* _G. C. Greubel_, Oct 29 2019 *)

%o (Sage)

%o @CachedFunction

%o def T(n, k):

%o if (k==0 or k==n): return 1

%o elif (mod(n,2)==0 and 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_, Oct 29 2019

%Y Cf. A026747, A026748, A026749, A026750, A026751, A026752, A026753, A026755, A026756, A026757.

%K nonn

%O 0,2

%A _Clark Kimberling_