A073145 a(n) = -a(n-1) - a(n-2) + a(n-3), a(0)=3, a(1)=-1, a(2)=-1.
3, -1, -1, 5, -5, -1, 11, -15, 3, 23, -41, 21, 43, -105, 83, 65, -253, 271, 47, -571, 795, -177, -1189, 2161, -1149, -2201, 5511, -4459, -3253, 13223, -14429, -2047, 29699, -42081, 10335, 61445, -113861, 62751, 112555, -289167, 239363, 162359, -690889, 767893, 85355
Offset: 0
Examples
G.f. = 3 - x - x^2 + 5*x^3 - 5*x^4 - x^5 + 11*x^6 - 15*x^7 + 3*x^8 + 23*x^9 + ...
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Mario Catalani, Polymatrix and Generalized Polynacci Numbers, arXiv:math/0210201 [math.CO], 2002.
- Curtis Cooper, S. Miller, Peter J. C. Moses, M. Sahin, and T. Thanatipanonda, On Identities of Ruggles, Horadam, Howard, and Young, Preprint 2016.
- Kai Wang, Identities for generalized enneanacci numbers, Generalized Fibonacci Sequences (2020).
- Index entries for linear recurrences with constant coefficients, signature (-1,-1,1).
Programs
-
Magma
I:=[3,-1,-1]; [n le 3 select I[n] else -Self(n-1)-Self(n-2)+Self(n-3): n in [1..50]]; // Vincenzo Librandi, Aug 17 2013
-
Mathematica
A = Table[0, {3}, {3}]; A[[1, 1]] = 1; A[[1, 2]] = 1; A[[2, 1]] = 1; A[[2, 3]] = 1; A[[3, 1]] = 1; For[i = 1; t = IdentityMatrix[3], i < 50, i++, t = t.A; Print[t[[2, 2]]*t[[3, 3]] - t[[2, 3]]*t[[3, 2]] + t[[1, 1]]*t[[3, 3]] - t[[1, 3]]*t[[3, 1]] + t[[1, 1]]*t[[2, 2]] - t[[1, 2]]*t[[2, 1]]]] LinearRecurrence[{-1, -1, 1}, {3, -1, -1}, 50] (* Vincenzo Librandi, Aug 17 2013 *) nxt[{a_,b_,c_}]:={b,c,a-b-c}; NestList[nxt,{3,-1,-1},50][[;;,1]] (* Harvey P. Dale, Jun 16 2024 *)
-
PARI
{a(n) = if( n<0, polsym(1 + x+ x^2 - x^3, -n)[-n+1], polsym(1 - x - x^2 - x^3, n)[n+1])}; /* Michael Somos, Dec 17 2016 */
-
PARI
a(n)=([0,1,0; 0,0,1; 1,-1,-1]^n*[3;-1;-1])[1,1] \\ Charles R Greathouse IV, Feb 07 2017
-
Sage
((3+2*x+x^2)/(1+x+x^2-x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Apr 22 2019
Formula
a(n) = -a(n-1) - a(n-2) + a(n-3), a(0)=3, a(1)=-1, a(2)=-1.
O.g.f.: (3 + 2*x + x^2)/(1 + x + x^2 - x^3).
a(n) = -T(n)^2 + 2*T(n-1)^2 + 3*T(n-2)^2 - 2*T(n)*T(n-1) + 2*T(n)*T(n-2) + 4*T(n-1)*T(n-2), where T(n) are tribonacci numbers (A000073).
From Peter Bala, Jun 29 2015: (Start)
a(n) = alpha^n + beta^n + gamma^n, where alpha, beta and gamma are the roots of 1 - x - x^2 - x^3 = 0.
x^2*exp( Sum_{n >= 1} a(n)*x^n/n ) = x^2 - x^3 + 2*x*5 - 3*x^6 + x^7 + ... is the o.g.f. for A057597. (End)
a(n) = A001644(-n) for all n in Z. - Michael Somos, Dec 17 2016
Extensions
Better name by Joerg Arndt, Aug 17 2013
More terms from Vincenzo Librandi, Aug 17 2013
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021
Comments