OFFSET
0,1
COMMENTS
See Comments at A245215.
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1999
FORMULA
a(n) = 2 - A144612(n) for all n > 0. - M. F. Hasler, Feb 06 2025
EXAMPLE
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].
From M. F. Hasler, Feb 06 2025: (Start)
Illustration of the "multiple of sqrt(3)" comment:
n: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
x: 0 1 1.73 2 3 3.46 4 5 5.20 6 6.93 7 8 8.66 9 10
m: 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0
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)
MATHEMATICA
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 *)
ContinuedFraction[max, 120] (* A245222 *)
PROG
(PARI) /* illustration of the comment related to sqrt(3)*/
[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
CROSSREFS
KEYWORD
nonn,cofr,easy
AUTHOR
Clark Kimberling, Jul 14 2014
EXTENSIONS
Offset changed by Andrew Howroyd, Aug 08 2024
STATUS
approved