OFFSET
1,1
COMMENTS
3.5*10^15 < a(8) <= 8778368652367133280. - Jon E. Schoenfield, Sep 12 2021
EXAMPLE
contfrac(1/2 + 1/6 + 1/18 + 1/102 + 1/40936) = [0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2] and 1/2 + 1/6 + 1/18 + 1/102 + 1/40936 = sqrt(3) - 1.0000002354...
MATHEMATICA
a[1] = 2; a[n_] := a[n] = Module[{k = a[n - 1] + 1, s = Sum[1/a[k], {k, 1, n - 1}]}, While[Max[ContinuedFraction[s + 1/k]] != 2, k++]; k]; Array[a, 6] (* Amiram Eldar, Sep 11 2021 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Benoit Cloitre, Sep 11 2021
EXTENSIONS
a(7) from Jon E. Schoenfield, Sep 11 2021
STATUS
approved