login
a(n+3) = -a(n+2) - 2*a(n+1) + a(n) with a(0)=3, a(1)=-1, a(2)=-3.
2

%I #29 Dec 19 2022 15:51:30

%S 3,-1,-3,8,-3,-16,30,-1,-75,107,42,-331,354,350,-1389,1043,2085,-5560,

%T 2433,10772,-21198,2087,51081,-76453,-23622,227609,-256818,-222022,

%U 963267,-776041,-1372515,3887864,-1918875,-7229368,14954982,-2415121,-34724211,54509435,12523866

%N a(n+3) = -a(n+2) - 2*a(n+1) + a(n) with a(0)=3, a(1)=-1, a(2)=-3.

%H Michael De Vlieger, <a href="/A276228/b276228.txt">Table of n, a(n) for n = 0..4925</a>

%H YĆ¼ksel Soykan, <a href="https://arxiv.org/abs/1910.03490">Summing Formulas For Generalized Tribonacci Numbers</a>, arXiv:1910.03490 [math.GM], 2019.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-2,1).

%F G.f.: (3 + 2*x + 2*x^2)/(1 + x + 2*x^2 - x^3).

%F Let (b, c, d) be the three roots of x^3 = 2*x^2 + x + 1, then a(n) = b^(-n) + c^(-n) + d^(-n) = A276225(-n).

%F a(2*n) = -3*a(2*n-2) - 6*a(2*n-4) + a(2*n-6).

%F a(n) = 2*A276229(n) + 2*A276229(n+1) + 3*A276229(n+2).

%t LinearRecurrence[{-1, -2, 1}, {3, -1, -3}, 50]

%t 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 *)

%t nxt[{a_,b_,c_}]:={b,c,a-2b-c}; NestList[nxt,{3,-1,-3},40][[All,1]] (* _Harvey P. Dale_, Dec 19 2022 *)

%o (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

%o (PARI) Vec((3+2*x+2*x^2)/(1+x+2*x^2-x^3) + O(x^99)) \\ _Altug Alkan_, Aug 25 2016

%Y Cf. A276225, A276229.

%K sign,easy

%O 0,1

%A _G. C. Greubel_, Aug 24 2016

%E Deleted certain dangerous or potentially dangerous links. - _N. J. A. Sloane_, Jan 30 2021