

A229287


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


1



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


LINKS

Table of n, a(n) for n=1..76.


EXAMPLE

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.


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}]]


CROSSREFS

Cf. A099088, A086395, A229288.
Sequence in context: A049400 A283524 A106382 * A286539 A004741 A133923
Adjacent sequences: A229284 A229285 A229286 * A229288 A229289 A229290


KEYWORD

nonn,cofr


AUTHOR

Clark Kimberling, Sep 19 2013


STATUS

approved



