OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (9,-33,63,-66,36,-8).
FORMULA
a(n) = 9*a(n-1) - 33*a(n-2) + 63*a(n-3) - 66*a(n-4) + 36*a(n-5) - 8*a(n-6).
G.f.: x*(1 + 8*x - 27*x^2 + 10*x^3 + 16*x^4)/(1 - 3*x + 2*x^2)^3.
a(n) = 2^n*(3+2*n+n^2) - (3+4*n+4*n^2). - Colin Barker, Oct 30 2017
E.g.f.: (3+6*x+4*x^2)*exp(2*x) - (3+8*x+4*x^2)*exp(x). - G. C. Greubel, Jul 25 2019
MATHEMATICA
(* First program *)
b[n_]:= 2^(n-1); c[n_]:= n;
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}] (* A213568 *)
d = Table[t[n, n], {n, 1, 40}] (* A213569 *)
s[n_]:= Sum[t[i, n+1-i], {i, 1, n}]
s1 = Table[s[n], {n, 1, 50}] (* A047520 *)
(* Additional programs *)
LinearRecurrence[{9, -33, 63, -66, 36, -8}, {1, 17, 93, 349, 1093, 3093}, 30] (* Harvey P. Dale, Jun 25 2014 *)
Rest[CoefficientList[Series[x(1+8x-27x^2+10x^3+16x^4)/(1-3x+2x^2)^3, {x, 0, 30}], x]] (* Vincenzo Librandi, Jun 26 2014 *)
PROG
(PARI) Vec(x*(1+8*x-27*x^2+10*x^3+16*x^4)/((1-x)^3*(1-2*x)^3) + O(x^30)) \\ Colin Barker, Oct 30 2017
(PARI) vector(30, n, 2^n*(3+2*n+n^2) - (3+4*n+4*n^2)) \\ G. C. Greubel, Jul 25 2019
(Magma) [2^n*(3+2*n+n^2) - (3+4*n+4*n^2): n in [1..30]]; // G. C. Greubel, Jul 25 2019
(Sage) [2^n*(3+2*n+n^2) - (3+4*n+4*n^2) for n in (1..30)] # G. C. Greubel, Jul 25 2019
(GAP) List([1..30], n-> 2^n*(3+2*n+n^2) - (3+4*n+4*n^2)); # G. C. Greubel, Jul 25 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 18 2012
STATUS
approved