OFFSET
1,4
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
AUTHOR
Clark Kimberling, Sep 19 2013
STATUS
approved