This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A321174 #27 Feb 19 2019 09:19:58 %S A321174 -1,-4,5,-15,31,-72,160,-361,810,-1821,4091,-9193,20656,-46414,104291, %T A321174 -234340,526557,-1183163,2658543,-5973692,13422764,-30160677,67770426, %U A321174 -152278765,342167279,-768842897,1727574308,-3881824234,8722379879,-19599009684,44038575013 %N A321174 a(n) = -2*a(n-1) + a(n-2) + a(n-3), a(0) = -1, a(1) = -4, a(2) = 5. %C A321174 Let {X,Y,Z} be the roots of the cubic equation t^3 + at^2 + bt + c = 0 where {a, b, c} are integers. %C A321174 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. %C A321174 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). %C A321174 Let k = Pi/7. %C A321174 This sequence has (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(8k), 2*cos(2k), 2*cos(4k)). %C A321174 A033304, A274975: (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(2k), 2*cos(4k), 2*cos(8k)). %C A321174 A321173 : (a, b, c) = (2, -1, -1), (u, v, w) = (2*cos(4k), 2*cos(8k), 2*cos(2k)). %C A321174 X = sin(2k)/sin(4k), Y = sin(4k)/sin(8k), Z = sin(8k)/sin(2k). %H A321174 Colin Barker, <a href="/A321174/b321174.txt">Table of n, a(n) for n = 0..1000</a> %H A321174 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-2,1,1). %F A321174 G.f.: -(1 + 6*x + 2*x^2) / (1 + 2*x - x^2 - x^3). - _Colin Barker_, Jan 11 2019 %t A321174 LinearRecurrence[{-2,1,1},{-1,-4,5},50] (* _Stefano Spezia_, Jan 11 2019 *) %o A321174 (PARI) Vec(-(1 + 6*x + 2*x^2) / (1 + 2*x - x^2 - x^3) + O(x^30)) \\ _Colin Barker_, Jan 11 2019 %Y A321174 Cf. A321173, A033304, A274975. %K A321174 sign,easy %O A321174 0,2 %A A321174 _Kai Wang_, Jan 10 2019