A187142 Smallest number k such that the continued fraction expansion of sqrt(k) contains n distinct numbers.
1, 2, 7, 14, 19, 61, 94, 151, 211, 436, 604, 844, 919, 1324, 1894, 2011, 2731, 3691, 4951, 5086, 6451, 7606, 9619, 10294, 13126, 15814, 17599, 21499, 19231, 21319, 30319, 31606, 34654, 42379, 46006, 53299, 48799, 60811, 76651, 78094, 85999, 90931
Offset: 1
Keywords
Examples
ContinuedFraction(sqrt(2),x) => 1,2,2,2,...: two distinct terms (1,2); sqrt(7) => 2,1,1,1,4,1,1,1,...: three distinct terms (1,2,4); sqrt(14) => four distinct terms (1,2,3,6); sqrt(19) => five distinct terms (1,2,3,4,8).
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..528 (terms 1..191 from Robert G. Wilson v)
Programs
-
Mathematica
f[n_] := Length@ Union@ Flatten@ ContinuedFraction@ Sqrt@ n; t = Table[ 0, {100}]; Do[a = f@ k; If[ a <= 100 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]], {k, 10^5}]; t
Comments