OFFSET
1,2
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..100
EXAMPLE
a(1) is 1.
a(2) is 2 because the cf of sqrt(2) = 1, 2, 2, .., .
a(3) is 14 because the cf of sqrt(14) = 3, {1, 2, 1, 6},
a(4) is 19 because the cf of sqrt(19) = 4, {2, 1, 3, 1, 2, 8},
a(5) is 211 because the cf of sqrt(211) = 14, {1, 1, 9, 5, 1, 2, 2, 1, 1, 4, 3, 1, 13, 1, 3, 4, 1, 1, 2, 2, 1, 5, 9, 1, 1, 28} which includes the natural numbers 1 through 5 and there does not exist any integer less than 211 which has this characteristics, etc.
MATHEMATICA
f[n_] := Block[{cf = Union@ Flatten@ ContinuedFraction@ Sqrt@ n, k = 1}, While[k <= Length[cf] && k == cf[[k]], k++]; k - 1]; t = Table[ 0, {100}]; k = 1; While[k < 10^7, a = f@ k; If[a <= Length[t] && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++]; t
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Mar 07 2011
STATUS
approved