login
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

%I #25 Sep 14 2021 03:58:54

%S 2,6,18,102,40936,4252528,7112715120

%N 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).

%C 3.5*10^15 < a(8) <= 8778368652367133280. - _Jon E. Schoenfield_, Sep 12 2021

%e 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...

%t 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 *)

%Y Cf. A160390.

%K nonn,more

%O 1,1

%A _Benoit Cloitre_, Sep 11 2021

%E a(7) from _Jon E. Schoenfield_, Sep 11 2021