login
Coefficient of x in minimal polynomial of the continued fraction [1^n,5,1,1,1,...], where 1^n means n ones.
3

%I #12 Sep 08 2022 08:46:15

%S -9,-47,-105,-295,-753,-1991,-5193,-13615,-35625,-93287,-244209,

%T -639367,-1673865,-4382255,-11472873,-30036391,-78636273,-205872455,

%U -538981065,-1411070767,-3694231209,-9671622887,-25320637425,-66290289415,-173550230793,-454360402991

%N Coefficient of x in minimal polynomial of the continued fraction [1^n,5,1,1,1,...], where 1^n means n ones.

%C See A265762 for a guide to related sequences.

%H Colin Barker, <a href="/A265805/b265805.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-1).

%F a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3).

%F G.f.: (-9 - 29 x + 7 x^2)/(1 - 2 x - 2 x^2 + x^3).

%F a(n) = (2^(-n)*(27*(-2)^n + 4*(3-sqrt(5))^n*(-9+5*sqrt(5)) - 4*(3+sqrt(5))^n*(9+5*sqrt(5))))/5. - _Colin Barker_, Oct 20 2016

%e Let p(n,x) be the minimal polynomial of the number given by the n-th continued fraction:

%e [5,1,1,1,1,...] = (9 + sqrt(5))/2 has p(0,x) = 19 - 9 x + x^2, so a(0) = 1;

%e [1,5,1,1,1,...] = (47 - sqrt(5))/38 has p(1,x) = 29 - 47 x + 19 x^2, so a(1) = 19;

%e [1,1,5,1,1,...] = (105 + sqrt(5))/58 has p(2,x) = 5 - 105 x + 29 x^2, so a(2) = 29.

%t u[n_] := Table[1, {k, 1, n}]; t[n_] := Join[u[n], {5}, {{1}}];

%t f[n_] := FromContinuedFraction[t[n]];

%t t = Table[MinimalPolynomial[f[n], x], {n, 0, 20}]

%t Coefficient[t, x, 0] (* A265804 *)

%t Coefficient[t, x, 1] (* A265805 *)

%t Coefficient[t, x, 2] (* A236804 *)

%t LinearRecurrence[{2, 2, -1}, {-9, -47, -105}, 30] (* _Vincenzo Librandi_, Jan 06 2016 *)

%o (Magma) I:=[-9,-47,-105]; [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 06 2016

%o (PARI) Vec((-9-29*x+7*x^2)/(1-2*x-2*x^2+x^3) + O(x^100)) \\ _Altug Alkan_, Jan 07 2016

%Y Cf. A265762, A265805.

%K sign,easy

%O 0,1

%A _Clark Kimberling_, Jan 05 2016