OFFSET
0,1
COMMENTS
In the following guide to related sequences, d(n), e(n), f(n) represent the coefficients in the minimal polynomial written as d(n)*x^2 + e(n)*x + f(n), except, in some cases, for initial terms. All of these sequences (eventually) satisfy the linear recurrence relation a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
continued fractions d(n) e(n) f(n)
The following forms of continued fractions have minimal polynomials of degree 4 and, after initial terms, satisfy the following linear recurrence relation:
a(n) = 5*a(n-1) + 15*a(n-2) - 15*a(n-3) - 5*a(n-4) + a(n-5).
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
FORMULA
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).
G.f.: (-3 + x + x^2)/(1 - 2 x - 2 x^2 + x^3).
a(n) = (-1)*(2^(-n)*(3*(-2)^n+2*((3-sqrt(5))^(1+n)+(3+sqrt(5))^(1+n))))/5. - Colin Barker, Sep 27 2016
EXAMPLE
Let p(n,x) be the minimal polynomial of the number given by the n-th continued fraction:
[2,1,1,1,1,...] = (3 + sqrt(5))/2 has p(0,x) = x^2 - 3x + 1, so a(0) = -3;
[1,2,1,1,1,...] = (5 - sqrt(5))/2 has p(1,x) = x^2 - 5x + 5, so a(1) = -5;
[1,1,2,1,1,...] = (15 + sqrt(5))/10 has p(2,x) = 5x^2 - 15x + 11, so a(2) = -15.
MATHEMATICA
Program 1:
u[n_] := Table[1, {k, 1, n}]; t[n_] := Join[u[n], {2}, {{1}}];
f[n_] := FromContinuedFraction[t[n]];
t = Table[MinimalPolynomial[f[n], x], {n, 0, 20}]
Coefficient[t, x, 0] (* A236428 *)
Coefficient[t, x, 1] (* A265762 *)
Coefficient[t, x, 2] (* A236428 *)
Program 2:
LinearRecurrence[{2, 2, -1}, {-3, -5, -15}, 50] (* Vincenzo Librandi, Jan 05 2016 *)
PROG
(PARI) Vec((-3+x+x^2)/(1-2*x-2*x^2+x^3) + O(x^100)) \\ Altug Alkan, Jan 04 2016
(Magma) I:=[-3, -5, -15]; [n le 3 select I[n] else 2*Self(n-1)+2*Self(n-2)-Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jan 05 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Clark Kimberling, Jan 04 2016
STATUS
approved