login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A268741 a(n) = 2*a(n - 2) - a(n - 1) for n>1, a(0) = 4, a(1) = 5. 1
4, 5, 3, 7, -1, 15, -17, 47, -81, 175, -337, 687, -1361, 2735, -5457, 10927, -21841, 43695, -87377, 174767, -349521, 699055, -1398097, 2796207, -5592401, 11184815, -22369617, 44739247, -89478481, 178956975, -357913937, 715827887, -1431655761, 2863311535 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
In general, the ordinary generating function for the recurrence relation b(n) = 2*b(n - 2) - b(n - 1) with n>1 and b(0)=k, b(1)=m, is (k + (k + m)*x)/(1 + x - 2*x^2). This recurrence gives the closed form a(n) = ((-2)^n*(k - m) + 2*k + m).
LINKS
FORMULA
G.f.: (4 + 9*x)/(1 + x - 2*x^2).
a(n) = (13 - (-2)^n)/3.
a(n) = A084247(n) + 3.
a(n) = (-1)^n*A154570(n+1) + 1.
a(n) = (-1)^(n-1)*A171382(n-1) + 2.
Limit_{n -> oo} a(n)/a(n + 1) = -1/2.
a(n) = 4 - (-1)^n *A001045(n). - Paul Curtz, Feb 26 2024
EXAMPLE
a(0) = (5 + 3)/2 = 4 because a(1) = 5, a(2) = 3;
a(1) = (3 + 7)/2 = 5 because a(2) = 3, a(3) = 7;
a(2) = (7 - 1)/2 = 3 because a(3) = 7, a(4) = -1, etc.
MATHEMATICA
Table[(13 - (-2)^n)/3, {n, 0, 33}]
LinearRecurrence[{-1, 2}, {4, 5}, 34]
RecurrenceTable[{a[1] == 4, a[2] == 5, a[n] == 2*a[n-2] - a[n-1]}, a, {n, 50}] (* Vincenzo Librandi, Feb 13 2016 *)
PROG
(Magma) [(13-(-2)^n)/3: n in [0..35]]; // Vincenzo Librandi, Feb 13 2016
(PARI) Vec((4 + 9*x)/(1 + x - 2*x^2) + O(x^40)) \\ Michel Marcus, Feb 25 2016
CROSSREFS
Sequence in context: A107793 A275275 A196402 * A263031 A004493 A348051
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Feb 12 2016
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)