OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
a(n) = (3 - 3*(-1)^n - 4*n + 18*n^2 + 4*n^3)/24.
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
G.f.: x*(1 + x + x^2 - x^3)/((1 - x)^4 *(1 + x)).
a(n+1) = a(n) + A047838(n+2) for n > 0. - Guenther Schrack, May 24 2018
a(n) = A212964(n+2) - n for n > 0. - Guenther Schrack, May 30 2018
MATHEMATICA
b[n_] := Floor[(n + 2)/2]; c[n_] := Floor[(n + 1)/2];
t[n_, k_] := Sum[b[k - i] c[n + i], {i, 0, k - 1}]
TableForm[Table[t[n, k], {n, 1, 10}, {k, 1, 10}]]
Flatten[Table[t[n - k + 1, k], {n, 12}, {k, n, 1, -1}]]
r[n_] := Table[t[n, k], {k, 1, 60}] (* A213783 *)
Table[t[n, n], {n, 1, 40}] (* A213759 *)
LinearRecurrence[{3, -2, -2, 3, -1}, {1, 4, 11, 22, 39}, 50] (* Harvey P. Dale, Jul 22 2014 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 22 2012
STATUS
approved