login
Last term in the continued fraction for floor(Fibonacci(n)*(1+sqrt(5))/2) / Fibonacci(n).
1

%I #39 Mar 16 2023 11:25:51

%S 1,1,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,

%T 2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,

%U 2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3,2,2,2,3

%N Last term in the continued fraction for floor(Fibonacci(n)*(1+sqrt(5))/2) / Fibonacci(n).

%C The continued fraction for floor(Fibonacci(n)*(1+sqrt(5))/2)/Fibonacci(n) consists of 1's except for the last term.

%C Also, continued fraction expansion of (33+4*sqrt(33))/33. - _Bruno Berselli_, Feb 15 2011

%H G. C. Greubel, <a href="/A185049/b185049.txt">Table of n, a(n) for n = 1..5000</a>

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

%F a(1)=a(2)=1 followed by the 4-periodic sequence with period [2,3,2,2].

%F a(n) = ((n mod 4)+3*(n+1 mod 4)+3*(n+2 mod 4)+5*(n+3 mod 4))/8 - A019590(n). - _Bruno Berselli_, Feb 15 2011

%F a(n) = 2+(1+(-1)^n)*(1+i^n)/4 - A019590(n), where i=sqrt(-1). - _Bruno Berselli_, Mar 16 2011

%F From _Colin Barker_, Jun 29 2013: (Start)

%F a(n) = a(n-4) for n>6.

%F G.f.: -x*(x^5+x^4+3*x^3+2*x^2+x+1) / ((x-1)*(x+1)*(x^2+1)). (End)

%t Table[ContinuedFraction[Floor[Fibonacci[n]*GoldenRatio]/Fibonacci[n]][[-1]], {n, 100}]

%t CoefficientList[Series[-x*(x^5 + x^4 + 3*x^3 + 2*x^2 + x + 1)/((x - 1)*(x + 1)*(x^2 + 1)), {x,0,50}], x] (* _G. C. Greubel_, Jun 20 2017 *)

%t PadRight[{1,1},120,{2,2,2,3}] (* _Harvey P. Dale_, Mar 24 2018 *)

%o (PARI) x='x+O('x^50); Vec(-x*(x^5+x^4+3*x^3+2*x^2+x+1)/((x-1)*(x+1)*(x^2+1))) \\ _G. C. Greubel_, Jun 20 2017

%K nonn,easy

%O 1,3

%A _Benoit Cloitre_, Feb 15 2011