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.

A091657 Length of the smallest prefix of the continued fraction expansion for Pi that includes each of 1..n.

Original entry on oeis.org

4, 9, 9, 30, 40, 40, 40, 44, 130, 130, 276, 276, 276, 276, 276, 276, 647, 647, 647, 647, 647, 647, 647, 647, 791, 791, 791, 791, 791, 791, 878, 878, 878, 878, 1008, 1008, 1008, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3041, 3200, 3200, 3200, 3200, 3200, 3200
Offset: 1

Views

Author

Robert G. Wilson v, Jan 26 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ StringPosition[ ToString[ Union[ ContinuedFraction[Pi, k]]], StringDrop[ ToString[ Table[i, {i, n}]], -1]] == {}, k++ ]; k]; Table[ f[n], {n, 1, 51}]

Formula

a(n) = max(A032523(n), a(n-1)) for n > 1. - Andrew Howroyd, Aug 05 2024

Extensions

Name clarified by Andrew Howroyd, Aug 05 2024