A105812 Expansion of (1+x-x^2)/(1+x).
1, 0, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1).
Programs
-
Mathematica
LinearRecurrence[{-1}, {1, 0, -1}, 78] (* Ray Chandler, Jul 30 2015 *)
-
PARI
a(n)=if(n<2,1-n,-(-1)^n) \\ Charles R Greathouse IV, Jun 06 2013
Formula
a(n) = -(-1)^n-binomial(1, n)+3*binomial(0, n).
a(n) = A033999(n-1), n>1. - R. J. Mathar, Aug 28 2008
E.g.f.: 2 - x - exp(-x). - Alejandro J. Becerra Jr., Feb 17 2021
Comments