OFFSET
1,1
COMMENTS
Any number x whose continued fraction expansion is eventually periodic can be written uniquely as x = (c+f*sqrt(d))/b, where b, c, f, d are integers, b > 0, d > 0 is squarefree, and GCD(b,c,f) = 1. a(n) is equal to d when the periodic part of the continued fraction of x is given by the n-th composition. If two numbers have eventually periodic continued fraction expansions with the same periodic part, their respective values of d are the same.
LINKS
FORMULA
EXAMPLE
For n = 6, the 5th composition is (1,2). The value of the continued fraction 1+1/(2+1/(1+1/(2+...))) is (1+sqrt(3))/2, so a(6) = 3.
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Pontus von Brömssen, Dec 10 2024
STATUS
approved