n-1 :0 1 2 3 4 ...
-0.5*[1+(-1)^n] :0 -1 0 -1 0 ...
n-1-0.5*[1+(-1)^n] :0 0 2 2 4 ...
(n-1-0.5*[1+(-1)^n])/2 :0 0 1 1 2 ...