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”).

A027064
a(n) = A027052(n, 2n-8).
2
1, 1, 3, 11, 37, 125, 421, 1405, 4637, 15125, 48777, 155665, 492157, 1543269, 4804663, 14865495, 45745953, 140118817, 427445507, 1299383403, 3937901525, 11902380845, 35891429675, 108009437323, 324455779889, 973119941425
OFFSET
4,3
LINKS
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( T(n, 2*n-8), n=4..30); # 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[T[n, 2*n-8], {n, 4, 30}] (* 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))
[T(n, 2*n-8) for n in (4..30)] # G. C. Greubel, Nov 06 2019
CROSSREFS
Sequence in context: A094977 A263986 A192339 * A027066 A291415 A046722
KEYWORD
nonn
STATUS
approved