A040240 Continued fraction for sqrt(257).
16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
Offset: 0
Examples
16 + 1/(32 + 1/(32 + 1/(32 + 1/(32 + ...)))) = sqrt(257).
Links
Programs
-
Maple
with(numtheory): Digits := 300: convert(evalf(sqrt(257)),confrac);
-
Mathematica
Block[{$MaxExtraPrecision=1000}, ContinuedFraction[Sqrt[257],100]] (* or *) PadRight[{16},100,{32}] (* Harvey P. Dale, Aug 15 2021 *)
-
PARI
a(n)=if(n,32,16) \\ Charles R Greathouse IV, Apr 08 2012
Formula
From Elmo R. Oliveira, Feb 13 2024: (Start)
a(n) = 32 for n >= 1.
G.f.: 16*(1+x)/(1-x).
E.g.f.: 32*exp(x) - 16.