login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Continued fraction of the constant c in A245221; c = sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A022838, else f(n,x) = 1/x.
7

%I #14 Aug 09 2024 01:53:56

%S 2,1,2,1,1,2,1,1,2,1,2,1,1,2,1,1,2,1,1,2,1,2,1,1,2,1,1,2,1,1,2,1,2,1,

%T 1,2,1,1,2,1,2,1,1,2,1,1,2,1,1,2,1,2,1,1,2,1,1,2,1,1,2,1,2,1,1,2,1,1,

%U 2,1,1,2,1,2,1,1,2,1,1,2,1,2,1,1,2,1

%N Continued fraction of the constant c in A245221; c = sup{f(n,1)}, where f(1,x) = x + 1 and thereafter f(n,x) = x + 1 if n is in A022838, else f(n,x) = 1/x.

%C See Comments at A245215.

%H G. C. Greubel, <a href="/A245222/b245222.txt">Table of n, a(n) for n = 0..1999</a>

%e c = 2.7207664507294752975469517348171513242... ; the first 12 numbers f(n,1) comprise S(12) = {1, 2, 1/2, 3/2, 2/3, 5/3, 8/3, 3/8, 11/8, 8/11, 19/11, 11/19}; max(S(12)) = 8/3, with continued fraction [2,1,2].

%t tmpRec = $RecursionLimit; $RecursionLimit = Infinity; u[x_] := u[x] = x + 1; d[x_] := d[x] = 1/x; r = Sqrt[3]; w = Table[Floor[k*r], {k, 2000}]; s[1] = 1; s[n_] := s[n] = If[MemberQ[w, n - 1], u[s[n - 1]], d[s[n - 1]]]; max = Max[N[Table[s[n], {n, 1, 3000}], 200]] (* A245221 *)

%t ContinuedFraction[max, 120] (* A245222 *)

%Y Cf. A226080 (infinite Fibonacci tree), A245217, A245219, A245220, A245221 (decimal expansion).

%K nonn,cofr,easy

%O 0,1

%A _Clark Kimberling_, Jul 14 2014

%E Offset changed by _Andrew Howroyd_, Aug 08 2024