login
A027031
a(n) = T(n,2n-7), T given by A027023.
2
1, 3, 9, 31, 105, 351, 1157, 3755, 12013, 37951, 118613, 367383, 1129345, 3449823, 10482869, 31713863, 95589753, 287224199, 860773781, 2573894583, 7681972113, 22890634939, 68116073369, 202458285647, 601159897137
OFFSET
4,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-7), n=4..30); # G. C. Greubel, Nov 05 2019
MATHEMATICA
T[n_, k_]:= T[n, k]= If[n<0, 0, If[k<3 || k==2*n, 1, Sum[T[n-1, k-j], {j, 3}]]]; Table[T[n, 2*n-7], {n, 4, 30}] (* G. C. Greubel, Nov 05 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-7) for n in (4..30)] # G. C. Greubel, Nov 05 2019
CROSSREFS
Sequence in context: A148961 A148962 A148963 * A027094 A027033 A027096
KEYWORD
nonn
STATUS
approved