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.

A229287 Least k such that the numerator of the continued fraction [1,..,1,k] (n 1s) is prime.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 4, 2, 1, 2, 1, 11, 4, 2, 1, 8, 3, 9, 6, 2, 1, 6, 4, 5, 4, 2, 1, 8, 3, 53, 12, 4, 7, 14, 3, 13, 4, 20, 3, 2, 1, 21, 8, 2, 1, 66, 5, 17, 16, 9, 3, 10, 4, 41, 4, 20, 15, 20, 3, 43, 6, 33, 15, 22, 12, 63, 36, 20, 3, 98, 37, 25, 30, 21, 17, 20
Offset: 1

Views

Author

Clark Kimberling, Sep 19 2013

Keywords

Examples

			The numerators of the continued fraction [1,1,1,1,k] for k=1,2 are 8,13; 8 is not prime and 13 is, so a(4) = 2.
		

Crossrefs

Programs

  • Mathematica
    z = 160; c[n_, k_] := Join[ContinuedFraction[GoldenRatio, n], {k}]; x[n_, k_] := Numerator[FromContinuedFraction[c[n, k]] ]; t[n_] := Table[x[n, k], {k, 1, z}]; u = Table[First[Select[t[n], PrimeQ]], {n, 1, z}]; Flatten[Table[Position[t[n], u[[n]]], {n, 1, z}]]