OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Periodic Continued Fraction
EXAMPLE
a(2) = 3, sqrt(3) = 1 + 1/(1 + 1/(2 + 1/(1 + 1/(2 + 1/...)))), period 2: [1, 2].
PROG
(Python)
from sympy import continued_fraction_periodic
def A288184(n):
d = 1
while True:
s = continued_fraction_periodic(0, 1, d)[-1]
if isinstance(s, list) and len(s) == n:
return d
d += 2 # Chai Wah Wu, Jun 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jun 06 2017
STATUS
approved