OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..1000
MATHEMATICA
cf100Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1, 1}, ContinuedFraction[ s][[2]]]; len=Length[cf]; OddQ[len] && cf[[(len+1)/2]] == 100]; Select[Range[2200000], cf100Q] (* Harvey P. Dale, May 29 2016 *)
PROG
(Python)
from sympy import continued_fraction_periodic
A031688_list = [n for n, s in ((i, continued_fraction_periodic(0, 1, i)[-1]) for i in range(1, 10**5)) if isinstance(s, list) and len(s) % 2 and s[(len(s)-1)//2] == 100] # Chai Wah Wu, Jun 11 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition corrected and terms corrected and extended by Harvey P. Dale, May 29 2016
STATUS
approved