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”).

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
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).
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
KEYWORD
sign,easy
AUTHOR
Ilya Gutkovskiy, Feb 12 2016
STATUS
approved