%I #25 Sep 08 2022 08:44:49
%S 1,4,11,34,103,306,901,2636,7685,22372,65111,189590,552547,1612154,
%T 4709369,13773368,40329465,118217992,346891115,1018872626,2995250535,
%U 8812601062,25948130525,76456539156,225427875325,665066293480
%N a(n) = Sum_{k=n+1..2*n} T(n, k), T given by A027023.
%H G. C. Greubel, <a href="/A027045/b027045.txt">Table of n, a(n) for n = 1..1000</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(add(T(n, k), k=n+1..2*n), n=1..30); # _G. C. Greubel_, Nov 04 2019
%t T[n_, k_]:= T[n, k]= If[k<3 || k==2*n, 1, Sum[T[n-1, k-j], {j,3}]]; Table[Sum[T[n,k], {k,n+1,2*n}], {n,30}] (* _G. C. Greubel_, Nov 04 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 [sum(T(n, k) for k in (n+1..2*n)) for n in (1..30)] # _G. C. Greubel_, Nov 04 2019
%o (Magma) function T(n,k)
%o if k lt 3 or k eq 2*n then return 1;
%o else return (&+[T(n-1,k-j): j in [1..3]]);
%o end if; return T; end function;
%o [(&+[T(n,k): k in [n+1..2*n]]): n in [1..15]]; // _G. C. Greubel_, Nov 20 2019
%Y Cf. A027023.
%K nonn
%O 1,2
%A _Clark Kimberling_
%E Offset changed by _G. C. Greubel_, Nov 04 2019
|