login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A027069
a(n) = diagonal sum of left-justified array T given by A027052.
2
1, 1, 1, 2, 2, 4, 5, 7, 11, 14, 22, 32, 43, 67, 97, 134, 206, 298, 419, 637, 923, 1312, 1978, 2872, 4111, 6161, 8961, 12888, 19232, 28010, 40423, 60129, 87665, 126840, 188216, 274634, 398151, 589689, 861001, 1250210, 1848840, 2700900, 3926839, 5799949, 8476579
OFFSET
0,4
LINKS
FORMULA
a(n) = Sum_{k=0..n} A027052(n - k, k). - Sean A. Irvine, Oct 22 2019
MAPLE
T:= proc(n, k) option remember;
if k<0 or k>2*n then 0
elif k=0 or k=2 or k=2*n then 1
elif k=1 then 0
else add(T(n-1, k-j), j=1..3)
fi
end:
seq( add(T(n-k, k), k=0..n), n=0..50); # G. C. Greubel, Nov 06 2019
MATHEMATICA
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 *)
PROG
(Sage)
@CachedFunction
def T(n, k):
if (k<0 or k>2*n): return 0
elif (k==0 or k==2 or k==2*n): return 1
elif (k==1): return 0
else: return sum(T(n-1, k-j) for j in (1..3))
[sum(T(n-k, k) for k in (0..n)) for n in (0..50)] # G. C. Greubel, Nov 06 2019
CROSSREFS
Sequence in context: A034398 A277062 A355638 * A238494 A359388 A325550
KEYWORD
nonn
EXTENSIONS
More terms from Sean A. Irvine, Oct 22 2019
STATUS
approved