cp's OEIS Frontend

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.

A322504 a(n) = -4*a(n-1) - 3*a(n-2) + a(n-3), a(0) = 1, a(1) = -2, a(2) = 4.

This page as a plain text file.
%I A322504 #39 Sep 08 2022 08:46:23
%S A322504 1,-2,4,-9,22,-57,153,-419,1160,-3230,9021,-25234,70643,-197849,
%T A322504 554233,-1552742,4350420,-12189221,34152882,-95693445,268125913,
%U A322504 -751270435,2105010556,-5898105006,16526117921,-46305146110,129744125671,-363534946433,1018602262609,-2854060085466,7996898607604
%N A322504 a(n) = -4*a(n-1) - 3*a(n-2) + a(n-3), a(0) = 1, a(1) = -2, a(2) = 4.
%C A322504 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 A322504 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 A322504 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 A322504 Let k = Pi/7.
%C A322504 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))).
%C A322504 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))).
%C A322504 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))).
%C A322504 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)).
%H A322504 Colin Barker, <a href="/A322504/b322504.txt">Table of n, a(n) for n = 0..1000</a>
%H A322504 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-4,-3,1).
%F A322504 G.f.: (1 + 2*x - x^2) / (1 + 4*x + 3*x^2 - x^3). - _Colin Barker_, Jan 11 2019
%t A322504 LinearRecurrence[{-4,-3,1},{1,-2,4},50] (* _Stefano Spezia_, Jan 11 2019 *)
%t A322504 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 *)
%o A322504 (PARI) Vec((1 + 2*x - x^2) / (1 + 4*x + 3*x^2 - x^3) + O(x^30)) \\ _Colin Barker_, Jan 11 2019
%o A322504 (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
%Y A322504 Cf. A215404, A136776.
%K A322504 sign,easy
%O A322504 0,2
%A A322504 _Kai Wang_, Jan 10 2019