login
A347727
a(1)=2; then a(n) is the least integer > a(n-1) such that 2 is the largest element in the continued fraction for 1/a(1) + 1/a(2) + ... + 1/a(n).
0
2, 6, 18, 102, 40936, 4252528, 7112715120
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
Cf. A160390.
Sequence in context: A162063 A162064 A162056 * A308549 A212653 A323104
KEYWORD
nonn,more
AUTHOR
Benoit Cloitre, Sep 11 2021
EXTENSIONS
a(7) from Jon E. Schoenfield, Sep 11 2021
STATUS
approved