OFFSET
4,2
COMMENTS
For n=1,2 a(1)=2, a(2)=1; for n=3 it is not a quadratic surd.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 4..84
FORMULA
EXAMPLE
For n=7 and n=8 the periods after the transient are as follows: cfrac(sqrt(2^7+1),'periodic','quotients'); gives [[11], [2, 1, 3, 1, 6, 1, 3, 1, 2, 22]] cfrac(sqrt(2^8+1),'periodic','quotients'); gives [[16], [32]]
MAPLE
with(numtheory): [seq(nops(cfrac(sqrt(2^k+1), 'periodic', 'quotients')[2]), k=4..28)];
MATHEMATICA
Table[Length[ContinuedFraction[Sqrt[2^n+1]][[2]]], {n, 4, 60}] (* Harvey P. Dale, Feb 05 2012 *)
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Labos Elemer, Mar 01 2001
EXTENSIONS
Two more terms from David W. Wilson, Jun 18 2001
Corrected and extended by Naohiro Nomoto, Nov 09 2001
a(58)-a(63) from Daniel Suteu, Jan 25 2019
STATUS
approved