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

A027063
a(n) = A027052(n, 2n-7).
2
0, 2, 6, 20, 68, 228, 754, 2456, 7884, 24982, 78282, 242998, 748364, 2289584, 6966346, 21098366, 63651808, 191406976, 573998990, 1717334182, 5127933348, 15286303526, 45503354154, 135287179508, 401809091392, 1192336418386
OFFSET
4,2
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-7), 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-7], {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-7) for n in (4..30)] # G. C. Greubel, Nov 06 2019
CROSSREFS
Sequence in context: A148476 A148477 A369123 * A291005 A027065 A231057
KEYWORD
nonn
STATUS
approved