cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A040240 Continued fraction for sqrt(257).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			16 + 1/(32 + 1/(32 + 1/(32 + 1/(32 + ...)))) = sqrt(257).
		

Crossrefs

Cf. A041480/A041481 (convergents).

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.
a(n) = 16*A040000(n) = 8*A040002(n) = 4*A040012(n) = 2*A040056(n). (End)