login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A077985 Expansion of 1/(1 + 2*x - x^2). 11
1, -2, 5, -12, 29, -70, 169, -408, 985, -2378, 5741, -13860, 33461, -80782, 195025, -470832, 1136689, -2744210, 6625109, -15994428, 38613965, -93222358, 225058681, -543339720, 1311738121, -3166815962, 7645370045, -18457556052, 44560482149, -107578520350, 259717522849 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Pisano period lengths: 1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, ... (is this A175181?) - R. J. Mathar, Aug 10 2012

The sequence 0, 1, -2, 5, -12, 29, -70, 169, -408, 985, ... with a leading 0 is the Lucas U(-2,-1)-sequence. - R. J. Mathar, Jan 08 2013

a(n) is the irrational part of the Q(sqrt(2)) integer (sqrt(2) - 1)^n = A123335(n) + a(n-1)*sqrt(2), with a(-1) = 0. - Wolfdieter Lang, Dec 07 2014

3^n*a(n-1) = A251733(n), with a(-1) = 0, is the

irrational part of the Q(sqrt(2)) integer giving the length of a variant of Lévy's C-curve at iteration step n. - Wolfdieter Lang, Dec 07 2014

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 0..1000

M. Janjic, Hessenberg Matrices and Integer Sequences , J. Int. Seq. 13 (2010) # 10.7.8.

Tanya Khovanova, Recursive Sequences

Wikipedia, Lucas sequence

Index entries for linear recurrences with constant coefficients, signature (-2,1)

Index to Lucas sequences, (-2,-1)

FORMULA

a(n) = (-1)^n * A000129(n+1). - M. F. Hasler, Oct 05 2008

a(0)=1, a(1)=-2, a(n) = -2*a(n-1) + a(n-2) for n>1. - Philippe Deléham, Sep 19 2009

G.f.: 1/(2+Q(0)), where Q(k)= 3*x - 1 + x*k + x*(1-x)*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 05 2013

G.f.: Q(0)/(2+2*x), where Q(k)= 1 + 1/(1 - x*(2*k-1)/( x*(2*k+1) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 10 2013

G.f.: Q(0)/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 - x )/( x*(4*k+4 - x) - 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 09 2013

G.f.: 1 / (1 + 2*x / (1 + x / (2 - x))). - Michael Somos, Jan 20 2017

a(n) = (-1)^n * a(-2-n) for all n in Z. - Michael Somos, Jan 20 2017

a(n) = (-(-1-sqrt(2))^(1+n) + (-1+sqrt(2))^(1+n)) / (2*sqrt(2)). - Colin Barker, Jan 21 2017

EXAMPLE

G.f. = 1 - 2*x + 5*x^2 - 12*x^3 + 29*x^4 - 70*x^5 + 169*x^6 - 408*x^7 + ...

MATHEMATICA

PSE[a_, b_, n_]:=Join[{1, x=a, y=b}, Table[z=Floor[y^2/x+1/2]; x=y; y=z, {n}]]; A077985=PSE[-2, 5, 50] (* Vladimir Joseph Stephan Orlovsky, Mar 26 2011 *)

LinearRecurrence[{-2, 1}, {1, -2}, 40] (* Harvey P. Dale, Jun 04 2012 *)

CoefficientList[Series[1/(1 + 2 x/(1 + x/(2 - x))), {x, 0, 30}], x] (* Vincenzo Librandi, Jan 21 2017 *)

PROG

(Sage) taylor( x/(1 + 2*x - x^2) , x, 0, 31) # Zerinvary Lajos, May 29 2009

(PARI) Vec(1/(1+2*x-x^2)+O(x^99)) \\ Charles R Greathouse IV, Sep 23 2012

(PARI) {a(n) = if( n<-1, (-1)^n*a(-2-n), polcoeff( 1 / (1 + 2*x - x^2) + x * O(x^n), n))}; /* Michael Somos, Jan 20 2017 */

(PARI) {a(n) = - imag((-1 - quadgen(8))^(n+1))}; /* Michael Somos, Jan 20 2017 */

(MAGMA) I:=[1, -2]; [n le 2 select I[n] else -2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Jan 21 2017

CROSSREFS

Essentially the same as A000129, which is the main entry for these numbers.

Cf. A123335, A251733.

Sequence in context: A215936 A000129 * A215928 A054198 A054196 A131710

Adjacent sequences:  A077982 A077983 A077984 * A077986 A077987 A077988

KEYWORD

sign,easy

AUTHOR

N. J. A. Sloane, Nov 17 2002

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 23 13:09 EST 2017. Contains 295127 sequences.