login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A105812
Expansion of (1+x-x^2)/(1+x).
2
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,1
COMMENTS
Row sums of number triangle A105810.
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
MATHEMATICA
LinearRecurrence[{-1}, {1, 0, -1}, 78] (* Ray Chandler, Jul 30 2015 *)
PROG
(PARI) a(n)=if(n<2, 1-n, -(-1)^n) \\ Charles R Greathouse IV, Jun 06 2013
CROSSREFS
Sequence in context: A079054 A131695 A324113 * A134323 A060576 A261012
KEYWORD
easy,sign
AUTHOR
Paul Barry, May 04 2005
STATUS
approved