This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A245222 #27 Feb 09 2025 20:05:05 %S A245222 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 A245222 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 A245222 2,1,1,2,1,2,1,1,2,1,1,2,1,2,1,1,2,1 %N A245222 Continued fraction expansion 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 A245222 See Comments at A245215. %C A245222 Appears to be the same as the sequence 1 + [x == 0 (mod sqrt(3))], as x runs over the elements of N U N*sqrt(3) in increasing order, where N = {0, 1, 2, 3, ...} and [...] is the Iverson bracket. - _M. F. Hasler_, Feb 06 2025 %H A245222 G. C. Greubel, <a href="/A245222/b245222.txt">Table of n, a(n) for n = 0..1999</a> %F A245222 a(n) = 2 - A144612(n) for all n > 0. - _M. F. Hasler_, Feb 06 2025 %e A245222 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]. %e A245222 From _M. F. Hasler_, Feb 06 2025: (Start) %e A245222 Illustration of the "multiple of sqrt(3)" comment: %e A245222 n: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 %e A245222 x: 0 1 1.73 2 3 3.46 4 5 5.20 6 6.93 7 8 8.66 9 10 %e A245222 m: 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 %e A245222 Here, x lists the elements of N U N*sqrt(3), and m = 1 if x == 0 (mod sqrt(3)), i.e., x is an integer multiple of sqrt(3). The sequence a(n) is m + 1. (End) %t A245222 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 A245222 ContinuedFraction[max, 120] (* A245222 *) %o A245222 (PARI) /* illustration of the comment related to sqrt(3)*/ %o A245222 [1+(abs(x-x\/s*s)<1e-9) | x<-Set(concat(Col([1.,s=sqrt(3)]~*[0..99])))[1..99] ] \\ _M. F. Hasler_, Feb 06 2025 %Y A245222 Cf. A226080 (infinite Fibonacci tree), A245217, A245219, A245220, A245221 (decimal expansion). %Y A245222 Cf. A144612 (Sturmian word of slope (3-sqrt(3))/2; same as 2-a(n)). %Y A245222 Cf. A006337 (Hofstadter's eta sequence: an analog with sqrt(2)). %K A245222 nonn,cofr,easy %O A245222 0,1 %A A245222 _Clark Kimberling_, Jul 14 2014 %E A245222 Offset changed by _Andrew Howroyd_, Aug 08 2024