A228932 Optimal ascending continued fraction expansion of sqrt(43) - 6.
2, 9, 30, 60, 122, -878, 11429, 35241, -177141, 709582, -3123032, -1157723745, 3237738813, -16178936725, 33395053634, -71863018424, -153349368674, -386763022623, -8021033029400, 16314606875900, 52522689388692
Offset: 1
Examples
sqrt(43) = 6 + 1/2*(1 + 1/9*(1 + 1/30*(1 + 1/60*(1 + 1/122*(1 - 1/878*(1 + ...)))))).
References
- See A228931.
Links
- G. C. Greubel, Table of n, a(n) for n = 1..500
Programs
-
Maple
ArticoExp := proc (n, q::posint)::list; local L, i, z; Digits := 50000; L := []; z := frac(evalf(n)); for i to q+1 do if z = 0 then break end if; L := [op(L), round(1/abs(z))*sign(z)]; z := abs(z)*round(1/abs(z))-1 end do; return L end proc # List the first 8 terms of the expansion of sqrt(43)-6 ArticoExp(sqrt(43),20)
-
Mathematica
ArticoExp[x_, n_] := Round[1/#] & /@ NestList[Round[1/Abs[#]]*Abs[#] - 1 &, FractionalPart[x], n]; Block[{$MaxExtraPrecision = 50000}, ArticoExp[Sqrt[43] - 6, 20]] (* G. C. Greubel, Dec 26 2016 *)
Comments