login
a(n) = T(n,2n-8), T given by A027023.
2

%I #9 Nov 05 2019 07:23:38

%S 1,1,5,17,57,193,649,2161,7113,23137,74417,236913,747401,2339137,

%T 7270189,22460801,69031105,211206529,643684485,1955082321,5920720729,

%U 17884040961,53898818389,162120056257,486791503521,1459448379329

%N a(n) = T(n,2n-8), T given by A027023.

%H G. C. Greubel, <a href="/A027032/b027032.txt">Table of n, a(n) for n = 4..750</a>

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

%p if k<3 or k=2*n then 1

%p else add(T(n-1, k-j), j=1..3)

%p fi

%p end:

%p seq(T(n,2*n-8), n=4..30); # _G. C. Greubel_, Nov 05 2019

%t T[n_, k_]:= T[n, k]= If[n<0, 0, If[k<3 || k==2*n, 1, Sum[T[n-1, k-j], {j, 3}]]]; Table[T[n, 2*n-8], {n,4,30}] (* _G. C. Greubel_, Nov 05 2019 *)

%o (Sage)

%o @CachedFunction

%o def T(n, k):

%o if (k<3 or k==2*n): return 1

%o else: return sum(T(n-1, k-j) for j in (1..3))

%o [T(n, 2*n-8) for n in (4..30)] # _G. C. Greubel_, Nov 05 2019

%K nonn

%O 4,3

%A _Clark Kimberling_