OFFSET
0,3
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-14,16,-8).
FORMULA
G.f.: x*(1-2*x+2*x^2-2*x^3+2*x^4)/((1-2*x)^2*(1-2*x+2*x^2)). - Bruno Berselli, Oct 18 2012
a(n) = 2^(n-3)*(3*n+2)+(1+i)^(n-4)+(1-i)^(n-4), where i=sqrt(-1) and n>1, with a(0)=0, a(1)=1. - Bruno Berselli, Oct 18 2012
a(n) = 6*a(n-1) -14*a(n-2) +16*a(n-3) -8*a(n-4).
MATHEMATICA
a[n_] := Sum[(1/4)*Binomial[n, k]*((-(1 + (-1)^k))*(-1 + (-1)^Floor[k/2]) - (-3 + (-1)^k)*k), {k, 0, n}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Oct 18 2012 *)
CoefficientList[Series[x*(1 - 2*x + 2*x^2 - 2*x^3 + 2*x^4)/((1 - 2*x)^2*(1 - 2*x + 2*x^2)), {x, 0, 40}], x]; // Vincenzo Librandi, Dec 15 2012
PROG
(Magma) I:=[0, 1, 4, 12, 30, 70]; [n le 6 select I[n] else 6*Self(n-1) - 14*Self(n-2) + 16*Self(n-3) - 8*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Dec 15 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Oct 18 2012
STATUS
approved