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.

Showing 1-2 of 2 results.

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)

A041480 Numerators of continued fraction convergents to sqrt(257).

Original entry on oeis.org

16, 513, 16432, 526337, 16859216, 540021249, 17297539184, 554061275137, 17747258343568, 568466328269313, 18208669762961584, 583245898743040001, 18682077429540241616, 598409723644030771713, 19167793234038524936432, 613967793212876828737537
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A041481.

Programs

  • Mathematica
    Numerator[Convergents[Sqrt[257],40]] (* or *) LinearRecurrence[{32,1},{16,513},40] (* Harvey P. Dale, Aug 13 2012 *)

Formula

a(n) = 32*a(n-1)+a(n-2), n>1 ; a(0)=16, a(1)=513. G.f.: (16+x)/(1-32*x-x^2). - Philippe Deléham, Nov 23 2008

Extensions

Additional term from Colin Barker, Nov 07 2013
Showing 1-2 of 2 results.