OFFSET
1,8
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
n=31: prime(31) = 127, and the periodic part of the continued fraction of sqrt(127) is {3,1,2,2,7,11,7,2,2,1,3,22}, so a(31) = 4.
MATHEMATICA
{te=Table[0, {m}], u=1}; Do[s=Count[PrimeQ[Union[Last[ContinuedFraction[f[n]^(1/2)]]]], True]; te[[u]]=s; u=u+1, {n, 1, m}]; te
Count[Union[ContinuedFraction[Sqrt[#]][[2]]], _?PrimeQ]&/@Prime[ Range[ 110]] (* Harvey P. Dale, Apr 27 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 29 2004
STATUS
approved