login
A331890
a(n) = -a(n-1) - a(n-2) + 2*a(n-3) with a(0)=3, a(1)=-1, a(2)=-1.
0
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,1
COMMENTS
a(n) is the reflected sequence (cf. A074058) of the generalized tribonacci sequence b(n) with b(0) = 3 and b(n) = A186575(n-1) for n > 0.
FORMULA
G.f.: (3 + 2*x + x^2)/(1 + x + x^2 - 2*x^3).
a(n) = 3*A077975(n)+2*A077975(n-1)+A077975(n-2). - R. J. Mathar, Feb 28 2020
MATHEMATICA
LinearRecurrence[{-1, -1, 2}, {3, -1, -1}, 38] (* Stefano Spezia, Jan 31 2020 *)
PROG
(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
CROSSREFS
Sequence in context: A359573 A359575 A034801 * A102435 A340882 A152570
KEYWORD
easy,sign
AUTHOR
Wojciech Florek, Jan 30 2020
EXTENSIONS
Definition clarified by N. J. A. Sloane, Apr 23 2020
STATUS
approved