A084173 a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4).
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
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,2).
Programs
-
Magma
[2^(n+1)-(2*n+1)/2-(-1)^n/2: n in [0..35]]; // Vincenzo Librandi, Jul 05 2011
-
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 *)
-
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
Comments