

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



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



KEYWORD

nonn,cofr


AUTHOR



STATUS

approved



