OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (4,-4,-2,4,0,-1).
FORMULA
a(n) = 4*a(n-1) - 4*a(n-2) - 2*a(n-3) + 4*a(n-4) + a(n-5).
G.f.: x*(1 + x - x^2 - 3*x^3)/(1 - 2*x + x^3)^2.
a(n) = Fibonacci(n+3) + n*Fibonacci(n+2) - 2*(n+1). - G. C. Greubel, Jul 08 2019
MATHEMATICA
(* First program *)
b[n_]:= Fibonacci[n]; 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}]] (* A213579 *)
r[n_]:= Table[T[n, k], {k, 40}]
d = Table[T[n, n], {n, 1, 40}] (* A213580 *)
s[n_]:= Sum[T[i, n+1-i], {i, 1, n}]
s1 = Table[s[n], {n, 1, 50}] (* A053808 *)
(* Second program *)
Table[Fibonacci[n+3] + n*Fibonacci[n+2] -2*(n+1), {n, 40}] (* G. C. Greubel, Jul 08 2019 *)
PROG
(PARI) vector(40, n, f=fibonacci; f(n+3) +n*f(n+2) -2*(n+1)) \\ G. C. Greubel, Jul 08 2019
(Magma) F:=Fibonacci; [F(n+3) + n*F(n+2) -2*(n+1): n in [1..40]]; // G. C. Greubel, Jul 08 2019
(Sage) f=fibonacci; [f(n+3) +n*f(n+2) -2*(n+1) for n in (1..40)] # G. C. Greubel, Jul 08 2019
(GAP) F:=Fibonacci;; List([1..40], n-> F(n+3) +n*F(n+2) -2*(n+1)); # G. C. Greubel, Jul 08 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 18 2012
STATUS
approved