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