OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (11,-47,101,-116,68,-16).
FORMULA
a(n) = (2^(n+2)*(2^n-1) - (2^(n+1) + n + 1)*n)/2.
a(n) = 11*a(n-1) - 47*a(n-2) + 101*a(n-3) - 116*a(n-4) + 68*a(n-5) - 16*a(n-6).
G.f.: f(x)/g(x), where f(x) = x*(1 + 2*x - 14*x^2 + 14*x^3) and g(x) = (1 - 4*x)*((1 - x)^3)*(1 - 2*x)^2.
MATHEMATICA
(* First program *)
b[n_]:= n; c[n_]:= -1 + 2^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}] (* A213571 *)
d = Table[t[n, n], {n, 1, 40}] (* A213572 *)
s[n_]:= Sum[t[i, n+1-i], {i, 1, n}]
s1 = Table[s[n], {n, 1, 50}] (* A213581 *)
(* Additional programs *)
Table[2^(2*n+1) -2^n*(n+2)-Binomial[n+1, 2], {n, 30}] (* G. C. Greubel, Jul 25 2019 *)
PROG
(PARI) vector(30, n, 2^(2*n+1) -2^n*(n+2) -binomial(n+1, 2)) \\ G. C. Greubel, Jul 25 2019
(Magma) [2^(2*n+1) -2^n*(n+2) -Binomial(n+1, 2): n in [1..30]]; // G. C. Greubel, Jul 25 2019
(Sage) [2^(2*n+1) -2^n*(n+2) -binomial(n+1, 2) for n in (1..30)] # G. C. Greubel, Jul 25 2019
(GAP) List([1..30], n-> 2^(2*n+1) -2^n*(n+2) -Binomial(n+1, 2)); # G. C. Greubel, Jul 25 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 19 2012
STATUS
approved