login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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