login
a(n) = Sum_{i=0..n} Sum_{j=0..n} T(i,j), T given by A026780.
11

%I #11 Feb 10 2022 09:18:27

%S 1,3,8,19,45,103,239,545,1262,2887,6700,15397,35848,82757,193320,

%T 448175,1050217,2443963,5743267,13410053,31593029,73984575,174689181,

%U 410141597,970289011,2283205051,5410611863,12756825609,30274963923

%N a(n) = Sum_{i=0..n} Sum_{j=0..n} T(i,j), T given by A026780.

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

%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(add(T(j,k), k=0..n), j=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[j, k], {k, 0, n}, {j, 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( sum( T(j,k) for k in (0..n)) for j in (0..n)) for n in (0..30)] # _G. C. Greubel_, Nov 02 2019

%Y Partial sums of A026787.

%Y Cf. A026780, A026781, A026782, A026783, A026784, A026785, A026786, A026788, A026790.

%K nonn

%O 0,2

%A _Clark Kimberling_