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.

A040968 Continued fraction for sqrt(1000).

Original entry on oeis.org

31, 1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1, 1, 62, 1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1, 1, 62, 1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1, 1, 62, 1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1, 1, 62, 1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1
Offset: 0

Views

Author

Keywords

Comments

After the initial term, periodic with period (1, 1, 1, 1, 1, 6, 2, 2, 15, 2, 2, 6, 1, 1, 1, 1, 1, 62) of length 18. - M. F. Hasler, Nov 02 2019

Crossrefs

Cf. A042936, A042937 (numerators & denominators of convergents).

Programs

  • Maple
    with(numtheory): Digits := 300: convert(evalf(sqrt(1000)),confrac);
  • Mathematica
    ContinuedFraction[Sqrt[1000],120] (* or *) PadRight[{31},120,{62,1,1,1,1,1,6,2,2,15,2,2,6,1,1,1,1,1}] (* Harvey P. Dale, Aug 22 2018 *)
  • PARI
    A40968=contfrac(sqrt(1000)) \\ For illustration. Better:
    A040968(n)={1+if(n%3, abs(n\/18*18-n)>6, n%9, !(n%6)*5, n%18, 14, n, 61, 30)} \\ M. F. Hasler, Nov 02 2019