OFFSET
1,1
COMMENTS
See A184117 (the lower s(n)-Wythoff sequence).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A184117(n) + s(n) for all n. - M. F. Hasler, Jan 07 2019
MAPLE
a:=n->floor((2+sqrt(2))*n+sqrt(2)/2): seq(a(n), n=1..80); # Muniru A Asiru, Jan 08 2019
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, 80}] (* Vincenzo Librandi, Jan 07 2019 *)
PROG
(PARI) A184118_upto(N, s(n)=2*n+1, U=[0], b=[])={until(b[#b]>=N, b=concat(b, s(1+#b)+U[1]+=1); U=setunion(U, [b[#b]]); while(#U>1&&U[2]==U[1]+1, U=U[^1])); b} \\ M. F. Hasler, Jan 07 2019
(Magma) [Floor((2+Sqrt(2))*n+Sqrt(2)/2): n in [1..100]]; // Vincenzo Librandi, Jan 07 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 09 2011
STATUS
approved