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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002249 a(n) = a(n-1) - 2*a(n-2) with a(0) = 2, a(1) = 1. 14
2, 1, -3, -5, 1, 11, 9, -13, -31, -5, 57, 67, -47, -181, -87, 275, 449, -101, -999, -797, 1201, 2795, 393, -5197, -5983, 4411, 16377, 7555, -25199, -40309, 10089, 90707, 70529, -110885, -251943, -30173, 473713, 534059, -413367, -1481485 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

4*2^n = A002249(n)^2+7*A001607(n)^2. See A077020, A077021.

Among presented initial elements of the sequence a(n), the maximal increasing or decreasing subsequences have length either 3 or 4. - Roman Witula, Aug 21 2012

This is the Lucas Sequence V_n(P, Q) = V_n(1, 2). U_n(1, 2) = A107920(n). - Raphie Frank, Dec 25 2013

LINKS

T. D. Noe, Table of n, a(n) for n=0..500

Wikipedia, Lucas Sequence.

Index to sequences with linear recurrences with constant coefficients, signature (1,-2).

FORMULA

G.f.: (2-x)/(1-x+2x^2). - Michael Somos, Oct 18 2002

a(n) = trace(A^n) for the square matrix A=[1, -2;1, 0]. - Paul Barry, Sep 05 2003

a(n) = 2^((n+2)/2)cos(-n*acot(sqrt(7)/7)). - Paul Barry, Sep 06 2003

a(n) = (-1)^n*(2*A110512(n)-A001607(n)) = ((1+i*sqrt(7))/2)^n + ((1-i*sqrt(7))/2)^n. - Roman Witula, Aug 21 2012

G.f.: G(0), where G(k)= 1 + 1/(1 - x*(7*k+1)/(x*(7*k+8) + 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 03 2013

(a(A060728(n) - 2))^2 = (A107920(2*(A060728(n)) - 4))^2 = 2^(A060728(n)) - 7 = A227078(n), the Ramanujan-Nagell squares. - Raphie Frank, Dec 25 2013

EXAMPLE

We have a(2)-a(7) = a(5)-a(4) = a(6)+a(4) = a(11)-a(10) = a(12)+a(10)=10. Further the following relations: ((1+i*sqrt(7))/2)^4 + ((1-i*sqrt(7))/2)^4 = 1 and ((1+i*sqrt(7))/2)^8 + ((1-i*sqrt(7))/2)^8 = -31. - Roman Witula, Aug 21 2012

G.f. = 2 + x - 3*x^2 - 5*x^3 + x^4 + 11*x^5 + 9*x^6 - 13*x^7 - 31*x^8 + ...

MAPLE

A002249 := proc(n) option remember; >if n = 1 then 1 elif n = 2 then -3 else A002249(n-1>)-2*A002249(n-2); fi; end;

MATHEMATICA

LinearRecurrence[{1, -2}, {2, 1}, 50] (* Roman Witula, Aug 21 2012 *)

a[ n_] := 2^(n/2) ChebyshevT[ n, 8^(-1/2)] 2; (* Michael Somos, Jun 02 2014 *)

a[ n_] := 2^Min[0, n] SeriesCoefficient[ (2 - x) / (1 - x + 2 x^2), {x, 0, Abs @ n}]; (* Michael Somos, Jun 02 2014 *)

PROG

(PARI) {a(n) = if( n<0, 2^n * a(-n), polsym(2 - x + x^2, n)[n+1])}; /* Michael Somos, Jun 02 2014 */

(PARI) {a(n) = 2 * real( ((1 + quadgen(-28)) / 2)^n )}; /* Michael Somos, Jun 02 2014 */

(Sage) [lucas_number2(n, 1, 2) for n in xrange(0, 40)]# Zerinvary Lajos, Apr 30 2009

CROSSREFS

Cf. A014551.

Sequence in context: A058168 A058169 A178074 * A157127 A066748 A106583

Adjacent sequences:  A002246 A002247 A002248 * A002250 A002251 A002252

KEYWORD

sign,easy

AUTHOR

N. J. A. Sloane, Iwan Duursma

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified April 2 02:38 EDT 2015. Contains 256144 sequences.