OFFSET
1,5
EXAMPLE
The numerators of the continued fraction [2,2,2,2,2,k] for k=1,2,3 are 99,169,239; the first two are not prime and 239 is, so a(5) = 3.
MATHEMATICA
z = 160; c[n_, k_] := Join[ContinuedFraction[1 + Sqrt[2], 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
AUTHOR
Clark Kimberling, Sep 19 2013
STATUS
approved