The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A122876 a(0)=1, a(1)=1, a(2)=2, a(n) = a(n-1) - a(n-2) for n>2. 2
 1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1, 1, 2, 1, -1, -2, -1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Essentially the same as A057079, A087204 and A100051. LINKS Index entries for linear recurrences with constant coefficients, signature (1,-1). FORMULA a(n) = Sum_{k=0..floor(n/2)}(-2)^k*A055830(n-k,k). G.f.: (1+2*x^2)/(1-x+x^2)^. a(n) = (1/2)*[(1/2)-(1/2)*I*sqrt(3)]^(n-1)+(1/2)*[(1/2)+(1/2)*I*sqrt(3)]^(n-1)+(1/2)*I*[(1/2)-(1/2)*I *sqrt(3)]^(n-1)*sqrt(3)-(1/2)*I*[(1/2)+(1/2)*I*sqrt(3)]^(n-1)*sqrt(3)+[C(2*n,n) mod 2], with n>=0 and I=sqrt(-1). - Paolo P. Lava, Nov 19 2008 MATHEMATICA LinearRecurrence[{1, -1}, {1, 1, 2}, 50] (* G. C. Greubel, May 03 2017; corrected by Georg Fischer, Apr 02 2019 *) (* or *) CoefficientList[Series[(1 + 2*x^2)/(1 - x + x^2), {x, 0, 50}], x] (* G. C. Greubel, May 03 2017 *) PROG (PARI) x='x+O('x^50); Vec((1+2*x^2)/(1-x+x^2)) \\ G. C. Greubel, May 03 2017 CROSSREFS Cf. A055830, A057079, A087204, A100051. Sequence in context: A099837 A100051 A281727 * A131713 A100063 A057079 Adjacent sequences:  A122873 A122874 A122875 * A122877 A122878 A122879 KEYWORD sign,easy AUTHOR Philippe Deléham, Oct 24 2006 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 27 16:20 EDT 2020. Contains 337383 sequences. (Running on oeis4.)