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

A084173
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).
1
1, 3, 5, 13, 27, 59, 121, 249, 503, 1015, 2037, 4085, 8179, 16371, 32753, 65521, 131055, 262127, 524269, 1048557, 2097131, 4194283, 8388585, 16777193, 33554407, 67108839, 134217701, 268435429, 536870883, 1073741795, 2147483617
OFFSET
0,2
COMMENTS
Original name was: A sum of generalized Jacobsthal numbers.
FORMULA
a(n) = 2^(n+1) - (2*n+1)/2 - (-1)^n/2.
G.f.: (4*x^3 - 3*x^2 + 1)/(-2*x^4 + 3*x^3 + x^2 - 3*x + 1).
a(n) = A084172(n) + A083579(n).
MATHEMATICA
a[n_]:=2^(n+1) - (2*n+1)/2 - (-1)^n/2; Array[a, 50, 0] (* or *)
CoefficientList[Series[(4*x^3 - 3*x^2 + 1)/(-2*x^4 + 3*x^3 + x^2 - 3*x + 1), {x, 0, 50}], x] (* or *)
LinearRecurrence[{3, -1, -3, 2}, {1, 3, 5, 13}, 50] (* Stefano Spezia, Oct 08 2018 *)
PROG
(Magma) [2^(n+1)-(2*n+1)/2-(-1)^n/2: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
(PARI) x='x+O('x^33); Vec((4*x^3-3*x^2+1)/(-2*x^4+3*x^3+x^2-3*x+1)) \\ Altug Alkan, Oct 08 2018
CROSSREFS
Sequence in context: A289467 A289533 A288827 * A354951 A223645 A190570
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 18 2003
STATUS
approved