%I #12 Nov 07 2019 08:27:52
%S 1,1,1,2,2,4,5,7,11,14,22,32,43,67,97,134,206,298,419,637,923,1312,
%T 1978,2872,4111,6161,8961,12888,19232,28010,40423,60129,87665,126840,
%U 188216,274634,398151,589689,861001,1250210,1848840,2700900,3926839,5799949,8476579
%N a(n) = diagonal sum of left-justified array T given by A027052.
%H G. C. Greubel, <a href="/A027069/b027069.txt">Table of n, a(n) for n = 0..1000</a>
%F a(n) = Sum_{k=0..n} A027052(n - k, k). - _Sean A. Irvine_, Oct 22 2019
%p T:= proc(n, k) option remember;
%p if k<0 or k>2*n then 0
%p elif k=0 or k=2 or k=2*n then 1
%p elif k=1 then 0
%p else add(T(n-1, k-j), j=1..3)
%p fi
%p end:
%p seq( add(T(n-k,k), k=0..n), n=0..50); # _G. C. Greubel_, Nov 06 2019
%t T[n_, k_]:= T[n, k]= If[k<0 || k>2*n, 0, If[k==0 || k==2 || k==2*n, 1, If[k==1, 0, Sum[T[n-1, k-j], {j,3} ]]]]; Table[Sum[T[n-k,k], {k,0,n}], {n, 0, 50}] (* _G. C. Greubel_, Nov 06 2019 *)
%o (Sage)
%o @CachedFunction
%o def T(n, k):
%o if (k<0 or k>2*n): return 0
%o elif (k==0 or k==2 or k==2*n): return 1
%o elif (k==1): return 0
%o else: return sum(T(n-1, k-j) for j in (1..3))
%o [sum(T(n-k,k) for k in (0..n)) for n in (0..50)] # _G. C. Greubel_, Nov 06 2019
%K nonn
%O 0,4
%A _Clark Kimberling_
%E More terms from _Sean A. Irvine_, Oct 22 2019
|