OFFSET
1,1
COMMENTS
See A184117 for the definition of lower and upper s(n)-Wythoff sequences.
(a(n)) is an inhomogeneous Beatty sequence, the complement of the inhomogeneous Beatty sequence (A136119(n)) = (floor(sqrt(2)*n + 1 - sqrt(2)/2)). See the paper by Fraenkel. - Michel Dekking, Jan 31 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Aviezri S. Fraenkel, Iterated floor function, algebraic numbers, discrete chaos, Beatty subsequences, semigroups, Transactions of the American Mathematical Society 341.2 (1994): p. 640.
FORMULA
a(n) = floor((2+sqrt(2))*n - sqrt(2)/2). - Michel Dekking, Jan 31 2017
MATHEMATICA
k=2; r=1;
mex:=First[Complement[Range[1, Max[#1]+1], #1]]&;
s[n_]:=k*n-r; a[1]=1; b[n_]:=b[n]=s[n]+a[n];
a[n_]:=a[n]=mex[Flatten[Table[{a[i], b[i]}, {i, 1, n-1}]]];
Table[s[n], {n, 30}]
Table[a[n], {n, 100}]
Table[b[n], {n, 100}]
Table[(Floor[(2 + Sqrt[2]) n - Sqrt[2]/2]), {n, 100}] (* Vincenzo Librandi, Jan 31 2017 *)
PROG
(Magma) [Floor((2+Sqrt(2))*n-Sqrt(2)/2): n in [1..80]]; // Vincenzo Librandi, Jan 31 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 09 2011
STATUS
approved