OFFSET
4,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 4..989
Christopher Hunt Gribble, C++ program
EXAMPLE
The first 14 rows of T(n,k) are:
.\ k 0 1 2 3 4
n
4 1 2
5 1 2
6 1 4
7 1 4
8 1 6 4
9 1 6 9
10 1 8 18
11 1 8 28
12 1 10 42 10
13 1 10 57 28
14 1 12 76 76
15 1 12 96 140
16 1 14 120 254 25
17 1 14 145 392 107
MATHEMATICA
T[n_, k_] := ((3^k + 1) Binomial[n - 3k, k] + Boole[EvenQ[k] || EvenQ[n]]*(3^Quotient[k + 1, 2] + 3^Quotient[k, 2]) * Binomial[(n - 3k - Mod[k, 2] - Mod[n, 2])/2, Quotient[k, 2]])/4; Table[T[n, k], {n, 4, 20}, {k, 0, Floor[n/4]}] // Flatten (* Jean-François Alcover, Oct 06 2017, after Andrew Howroyd *)
PROG
(C++) See Gribble link.
(PARI)
T(n, k)={((3^k+1)*binomial(n-3*k, k) + (k%2==0||n%2==0) * (3^((k+1)\2)+3^(k\2)) * binomial((n-3*k-(k%2)-(n%2))/2, k\2))/4}
for(n=4, 20, for(k=0, floor(n/4), print1(T(n, k), ", ")); print) \\ Andrew Howroyd, May 29 2017
CROSSREFS
KEYWORD
tabf,nonn
AUTHOR
Christopher Hunt Gribble, Feb 28 2014
EXTENSIONS
Terms corrected and xrefs updated by Christopher Hunt Gribble, Apr 27 2015
Terms a(28) and beyond from Andrew Howroyd, May 29 2017
STATUS
approved