login
a(1)=1, a(n) is the smallest number > a(n-1) such that the simple continued fraction for 1/a(1) + 1/a(2) + ... + 1/a(n) contains exactly n elements.
2

%I #6 Jun 05 2022 08:31:03

%S 1,2,3,11,16,21,27,35,42,51,55,63,75,89,350,364,385,536,644,707,4290,

%T 10483,13818,2923344,3187100,7820430,31734729,39111981

%N a(1)=1, a(n) is the smallest number > a(n-1) such that the simple continued fraction for 1/a(1) + 1/a(2) + ... + 1/a(n) contains exactly n elements.

%t seq[len_] := Module[{s = {}, sum = 0, t = 0}, Do[t++; While[Length[ContinuedFraction[sum + 1/t]] != n, t++]; sum += 1/t; AppendTo[s, t], {n, 1, len}]; s]; seq[23]

%o (PARI) s=0; t=0; for(n=1, 40, t++; while(length(contfrac(s+1/t)) != n, t++); s+=1/t; print1(t, ", "))

%Y Cf. A071012, A201267.

%K nonn,more

%O 1,2

%A _Amiram Eldar_, Jun 05 2022