OFFSET
1,2
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..500
Index entries for linear recurrences with constant coefficients, signature (3,0,-5,0,3,1).
FORMULA
a(n) = 3*a(n-1) - 5*a(n-3) + 3*a(n-5) + a(n-6).
G.f.: x*(1 + 3*x + 2*x^2)/(1 - x - x^2)^3.
a(n) = (n+1)/2*Sum_{j=0..(n+1)/2}((n-j)*binomial(n-j+1,j)). - Vladimir Kruchinin, Apr 09 2016
a(n) = (n+1)*(n*Lucas(n+3) - 2*Fibonacci(n))/10 = (n+1)*((n+2) *Fibonacci(n+3) + 2*(n-2)*Fibonacci(n+2))/10. - 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+1)*(n*LucasL[n+3] -2*Fibonacci[n])/10, {n, 35}]] (* G. C. Greubel, Jul 08 2019 *)
PROG
(Maxima)
a(n):=(n+1)/2*sum((n-j)*binomial(n-j+1, j), j, 0, (n+1)/2); /* Vladimir Kruchinin, Apr 09 2016 */
(PARI) vector(35, n, f=fibonacci; (n+1)*((n+2)*f(n+3)+ 2*(n-2)*f(n+2) )/10) \\ G. C. Greubel, Jul 08 2019
(Magma) F:=Fibonacci; [(n+1)*((n+2)*F(n+3) + 2*(n-2)*F(n+2))/10: n in [1..35]]; // G. C. Greubel, Jul 08 2019
(Sage) f=fibonacci; [(n+1)*((n+2)*f(n+3)+ 2*(n-2)*f(n+2) )/10 for n in (1..35)] # G. C. Greubel, Jul 08 2019
(GAP) F:=Fibonacci;; List([1..35], n-> (n+1)*((n+2)*F(n+3) + 2*(n-2)*F(n+2))/10) # G. C. Greubel, Jul 08 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 19 2012
STATUS
approved