%I #22 Feb 16 2023 14:56:54
%S 20,2020,206040,21014040,2143226060,218588044060,22293837268080,
%T 2273752813300080,231900493119340100,23651576545359390100,
%U 2412228907133538450120,246023696951075562522120,25092004860102573838806140,2559138472033511455995704140
%N Denominators of Pythagorean approximations to 5.
%C See A195500 for a discussion and references.
%H Colin Barker, <a href="/A195622/b195622.txt">Table of n, a(n) for n = 1..498</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (101,101,-1).
%F From _Colin Barker_, Jun 03 2015: (Start)
%F a(n) = 101*a(n-1) + 101*a(n-2) - a(n-3).
%F G.f.: 20*x/((1+x)*(1-102*x+x^2)). (End)
%F a(n) = (5/26)*(A097726(n) - (-1)^n). - _G. C. Greubel_, Feb 15 2023
%t r = 5; z = 20;
%t p[{f_, n_}] := (#1[[2]]/#1[[
%t 1]] &)[({2 #1[[1]] #1[[2]], #1[[1]]^2 - #1[[
%t 2]]^2} &)[({Numerator[#1], Denominator[#1]} &)[
%t Array[FromContinuedFraction[
%t ContinuedFraction[(#1 + Sqrt[1 + #1^2] &)[f], #1]] &, {n}]]]];
%t {a, b} = ({Denominator[#1], Numerator[#1]} &)[
%t p[{r, z}]] (* A195622, A195623 *)
%t Sqrt[a^2 + b^2] (* A097727 *)
%t (* by _Peter J. C. Moses_, Sep 02 2011 *)
%t LinearRecurrence[{101,101,-1},{20,2020,206040},20] (* _Harvey P. Dale_, Oct 17 2021 *)
%o (PARI) Vec(20*x/((x+1)*(x^2-102*x+1)) + O(x^20)) \\ _Colin Barker_, Jun 03 2015
%o (Magma) I:=[20,2020,206040]; [n le 3 select I[n] else 101*Self(n-1) +101*Self(n-2) -Self(n-3): n in [1..40]]; // _G. C. Greubel_, Feb 15 2023
%o (SageMath)
%o A097726=BinaryRecurrenceSequence(102, -1, 1, 103)
%o [(5/26)*(A097726(n) - (-1)^n) for n in range(1, 41)] # _G. C. Greubel_, Feb 15 2023
%Y Cf. A097726, A195500, A195623.
%K nonn,easy,frac
%O 1,1
%A _Clark Kimberling_, Sep 22 2011
|