A276228 a(n+3) = -a(n+2) - 2*a(n+1) + a(n) with a(0)=3, a(1)=-1, a(2)=-3.
3, -1, -3, 8, -3, -16, 30, -1, -75, 107, 42, -331, 354, 350, -1389, 1043, 2085, -5560, 2433, 10772, -21198, 2087, 51081, -76453, -23622, 227609, -256818, -222022, 963267, -776041, -1372515, 3887864, -1918875, -7229368, 14954982, -2415121, -34724211, 54509435, 12523866
Offset: 0
Links
- Michael De Vlieger, Table of n, a(n) for n = 0..4925
- Yüksel Soykan, Summing Formulas For Generalized Tribonacci Numbers, arXiv:1910.03490 [math.GM], 2019.
- Index entries for linear recurrences with constant coefficients, signature (-1,-2,1).
Programs
-
Magma
I:=[3,-1,-3]; [n le 3 select I[n] else -Self(n-1)- 2*Self(n-2)+Self(n-3): n in [1..40]]; // Vincenzo Librandi, Aug 25 2016
-
Mathematica
LinearRecurrence[{-1, -2, 1}, {3, -1, -3}, 50] CoefficientList[Series[(3 + 2 x + 2 x^2)/(1 + x + 2 x^2 - x^3), {x, 0, 38}], x] (* Michael De Vlieger, Aug 25 2016 *) nxt[{a_,b_,c_}]:={b,c,a-2b-c}; NestList[nxt,{3,-1,-3},40][[All,1]] (* Harvey P. Dale, Dec 19 2022 *)
-
PARI
Vec((3+2*x+2*x^2)/(1+x+2*x^2-x^3) + O(x^99)) \\ Altug Alkan, Aug 25 2016
Formula
Extensions
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
Comments