OFFSET
1,2
EXAMPLE
For n=127: the period={3,1,2,2,7,11,7,2,2,1,3,22}, max=a(127)=22.
MAPLE
A096491 := proc(n)
if issqr(n) then
sqrt(n) ;
else
numtheory[cfrac](sqrt(n), 'periodic', 'quotients') ;
%[2] ;
max(op(%)) ;
end if;
end proc:
# R. J. Mathar, Mar 18 2010
MATHEMATICA
u=1; Do[s=Max[Last[ContinuedFraction[n^(1/2)]]]; tc[[u]]=s; u=u+1, {n, 1, m}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Jun 29 2004
EXTENSIONS
Definition revised by N. J. A. Sloane, Mar 18 2010
STATUS
approved