OFFSET
1,2
LINKS
Altug Alkan, Table of n, a(n) for n = 1..10752
MATHEMATICA
Nest[Append[#1, If[EvenQ@ #2, -Floor[E #1[[#2/2]] ], #2 - #1[[-1]] ]] & @@ {#, Length@ # + 1} &, {1}, 65] (* Michael De Vlieger, Aug 25 2018 *)
PROG
(PARI) a(n)=if(n==1, 1, if(n%2==0, -floor(exp(1)*a(n/2)), n-a(n-1)));
CROSSREFS
KEYWORD
sign,look
AUTHOR
Altug Alkan, Aug 25 2018
STATUS
approved