login
A106511
Expansion of g.f. (1+x)^2/((1 + x + x^2)*(1 + x - x^2)).
3
1, 0, 0, 0, 1, -2, 3, -4, 6, -10, 17, -28, 45, -72, 116, -188, 305, -494, 799, -1292, 2090, -3382, 5473, -8856, 14329, -23184, 37512, -60696, 98209, -158906, 257115, -416020, 673134, -1089154, 1762289, -2851444, 4613733, -7465176, 12078908, -19544084, 31622993
OFFSET
0,6
COMMENTS
Diagonal sums of the Riordan array ((1+x)/(1+x+x^2), x/(1+x)), A106509.
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) )
def A106511(n): return (-1)^n*( fibonacci(n-1) - A005252(n-2) )
[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