OFFSET
0,2
COMMENTS
Let {X,Y,Z} be the roots of the cubic equation t^3 + at^2 + bt + c = 0 where {a, b, c} are integers.
Let {u, v, w} be three numbers such that {u + v + w, u*X + v*Y + w*Z, u*X^2 + v*Y^2 + w*Z^2} are integers.
Then {p(n) = u*X^n + v*Y^n + w*Z^n | n = 0, 1, 2, ...} is an integer sequence with the recurrence relation: p(n) = -a*p(n-1) - b*p(n-2) - c*p(n-3).
Let k = Pi/7.
This sequence has (a, b, c) = (4, 3, -1), (u, v, w) = (1/(sqrt(7)*tan(8k)), 1/(sqrt(7)*tan(2k)), 1/(sqrt(7)*tan(4k))).
A215404: (a, b, c) = (4, 3, -1), (u, v, w) = (1/(sqrt(7)*tan(2k)), 1/(sqrt(7)*tan(4k)), 1/(sqrt(7)*tan(8k))).
A136776: (a, b, c) = (4, 3, -1), (u, v, w) = (1/(sqrt(7)*tan(4k)), 1/(sqrt(7)*tan(8k)), 1/(sqrt(7)*tan(2k))).
X = (sin(2k)*sin(2k))/(sin(4k)*sin(8k)), Y = (sin(4k)*sin(4k))/(sin(8k)*sin(2k)), Z = (sin(8k)*sin(8k))/(sin(2k)*sin(4k)).
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-4,-3,1).
FORMULA
G.f.: (1 + 2*x - x^2) / (1 + 4*x + 3*x^2 - x^3). - Colin Barker, Jan 11 2019
MATHEMATICA
LinearRecurrence[{-4, -3, 1}, {1, -2, 4}, 50] (* Stefano Spezia, Jan 11 2019 *)
RecurrenceTable[{a[0]==1, a[1]==-2, a[2]==4, a[n]==-4 a[n-1]-3 a[n-2]+a[n-3]}, a, {n, 30}] (* Vincenzo Librandi, Jan 13 2019 *)
PROG
(PARI) Vec((1 + 2*x - x^2) / (1 + 4*x + 3*x^2 - x^3) + O(x^30)) \\ Colin Barker, Jan 11 2019
(Magma) I:=[1, -2, 4]; [n le 3 select I[n] else -4*Self(n-1) - 3*Self(n-2) + Self(n-3): n in [1..31]]; // Vincenzo Librandi, Jan 13 2019
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Kai Wang, Jan 10 2019
STATUS
approved