OFFSET
1,2
COMMENTS
See A184117 for the definition of lower and upper s-Wythoff sequences.
The sequence is defined by a(1) = 1 and for n > 1, a(n) is the smallest positive integer not in {a(k), a(k) + s(k); k < n}. - M. F. Hasler, Jan 07 2019
FORMULA
a(n) = A184479(n) - s(n). - M. F. Hasler, Jan 07 2019
MAPLE
a:=n->floor(n*(-1+sqrt(13))/2+1): seq(a(n), n=0..120); # Muniru A Asiru, Jan 08 2019
MATHEMATICA
k=3; r=-1; d=Sqrt[4+k^2];
a[n_]:=Floor[(1/2)(d+2-k)(n+r/(d+2))];
b[n_]:=Floor[(1/2)(d+2+k)(n-r/(d+2))];
Table[a[n], {n, 120}]
Table[b[n], {n, 120}]
Table[(Floor[n (-1 + Sqrt[13]) / 2]) + 1, {n, 0, 120}] (* Vincenzo Librandi, Jan 08 2019 *)
PROG
(PARI) A184478_upto(N, s(n)=3*n+1, a=[1], U=a)={while(a[#a]<N, U=setunion(U, [a[#a], a[#a]+s(#a)]); while(#U>1&&U[2]==U[1]+1, U=U[^1]); a=concat(a, U[1]+1)); a} \\ M. F. Hasler, Jan 07 2019
(Magma) [(Floor(n*(-1+Sqrt(13))/2))+1: n in [0..120]]; // Vincenzo Librandi, Jan 08 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 15 2011
STATUS
approved