OFFSET
1,1
LINKS
Chai Wah Wu,Table of n, a(n) for n = 1..10000
MATHEMATICA
ep99Q[n_]:=Module[{s=Sqrt[n], cf, len}, cf=If[IntegerQ[s], {1}, ContinuedFraction[s][[2]]]; len= Length[ cf]; EvenQ[len]&&cf[[len/2]]==99]; Select[Range[40000], ep99Q] (*Harvey P. Dale,May 07 2023 *)
PROG
(Python)
from __future__ import division
from sympy import continued_fraction_periodic
A031597_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 == 0 and s[len(s)//2-1] == 99] #Chai Wah Wu,Jun 10 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Definition corrected byHarvey P. Dale,May 07 2023
STATUS
approved