login
A027029
a(n) = T(n,2n-5), T given by A027023.
2
1, 3, 9, 31, 101, 319, 985, 2991, 8973, 26687, 78877, 232083, 680645, 1991487, 5817073, 16971415, 49474389, 144149959, 419869065, 1222785111, 3561052305, 10371483259, 30211361481, 88022087975, 256521698097, 747794233779
OFFSET
3,2
LINKS
MAPLE
T:= proc(n, k) option remember;
if k<3 or k=2*n then 1
else add(T(n-1, k-j), j=1..3)
fi
end:
seq(T(n, 2*n-5), n=3..30); # G. C. Greubel, Nov 04 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k<3 || k==2*n, 1, Sum[T[n-1, k-j], {j, 3}]]; Table[T[n, 2*n-5], {n, 3, 30}] (* G. C. Greubel, Nov 04 2019 *)
PROG
(Sage)
@CachedFunction
def T(n, k):
if (k<3 or k==2*n): return 1
else: return sum(T(n-1, k-j) for j in (1..3))
[T(n, 2*n-5) for n in (3..30)] # G. C. Greubel, Nov 04 2019
CROSSREFS
Sequence in context: A049416 A148959 A148960 * A027092 A148961 A148962
KEYWORD
nonn
STATUS
approved