OFFSET
0,6
COMMENTS
Diagonal sums of the Riordan array ((1+x)/(1+x+x^2), x/(1+x)), A106509.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-2,-1,0,1).
FORMULA
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2k} (-1)^j*binomial(2n-3k-j, j).
a(n) = (1/2)*((-1)^n*Fibonacci(n) + Kronecker(-3,n)). - Ralf Stephan, Jun 02 2007
a(n) = -2*a(n-1) - a(n-2) + a(n-4), a(0)=1, a(1)=a(2)=a(3)=0. - Philippe Deléham, Jan 12 2014
a(n) = (-1)^n*(Fibonacci(n-1) - A005252(n-2)), n>=2. - Katharine Ahrens, May 05 2019
E.g.f.: exp(-x/2)*(15*cos(sqrt(3)*x/2) + 15*cosh(sqrt(5)*x/2) + 5*sqrt(3)*sin(sqrt(3)*x/2) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/30. - Stefano Spezia, Oct 19 2023
MATHEMATICA
CoefficientList[Series[(1 + x)^2/((1 + x + x^2)(1 + x - x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jan 12 2014 *)
PROG
(Magma) I:=[1, 0, 0, 0]; [n le 4 select I[n] else -2*Self(n-1)-Self(n-2)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jan 12 2014
(Sage)
def A005252(n): return sum( binomial(n-2*k, 2*k) for k in (0..n//4) )
[A106511(n) for n in (0..45)] # G. C. Greubel, Apr 29 2021
(PARI) a(n) = (fibonacci(1-n) + 1 - n%3) >> 1; \\ Kevin Ryde, Apr 29 2021
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 04 2005
STATUS
approved