A331890 a(n) = -a(n-1) - a(n-2) + 2*a(n-3) with a(0)=3, a(1)=-1, a(2)=-1.
3, -1, -1, 8, -9, -1, 26, -43, 15, 80, -181, 131, 210, -703, 755, 368, -2529, 3671, -406, -8323, 16071, -8560, -24157, 64859, -57822, -55351, 242891, -303184, -50409, 839375, -1395334, 455141, 2618943, -5864752, 4156091, 6946547, -22832142, 24197777
Offset: 0
Links
- Mario Catalani, Polymatrix and Generalized Polynacci Numbers, arXiv:math/0210201 [math.CO], 2002.
- Index entries for linear recurrences with constant coefficients, signature (-1,-1,2).
Programs
-
Magma
a:=[3,-1,-1]; [n le 3 select a[n] else -Self(n-1)-Self(n-2)+2*Self(n-3):n in [1..30]]; // Marius A. Burtea, Feb 02 2020
-
Mathematica
LinearRecurrence[{-1,-1,2},{3,-1,-1},38] (* Stefano Spezia, Jan 31 2020 *)
Formula
G.f.: (3 + 2*x + x^2)/(1 + x + x^2 - 2*x^3).
Extensions
Definition clarified by N. J. A. Sloane, Apr 23 2020
Comments