%I #11 Jun 09 2022 02:24:38
%S 0,1,1,0,-1,-2,-3,-3,-3,-2,-1,1,3,6,9,12,15,18,21,23,25,26,27,26,25,
%T 22,19,13,7,-2,-11,-23,-35,-50,-65,-83,-101,-122,-143,-166,-189,-214,
%U -239,-265,-291,-318,-345,-371,-397,-422,-447,-469,-491,-510,-529,-542,-555,-562,-569,-567,-565,-554,-543,-520,-497,-462
%N a(n+1) = a(n) - a(floor(n/2)), with a(0)=0, a(1)=1.
%C Period of oscillations above and below the axis more than doubles at each cycle.
%F G.f. A(x) satisfies: A(x) = x * (1 - (1 + x)*A(x^2))/(1 - x). - _Ilya Gutkovskiy_, May 04 2019
%e a(6) = a(5) - a(2) = -2 - 1 = -3.
%e a(7) = a(6) - a(3) = -3 - 0 = -3.
%o (Python)
%o from itertools import islice
%o from collections import deque
%o def A062187_gen(): # generator of terms
%o aqueue, f, b, a = deque([1]), True, 0, 1
%o yield from (0,1)
%o while True:
%o a -= b
%o yield a
%o aqueue.append(a)
%o if f: b = aqueue.popleft()
%o f = not f
%o A061287_list = list(islice(A062187_gen(),40)) # _Chai Wah Wu_, Jun 08 2022
%Y Cf. A033485, A062186, A062188.
%K sign
%O 0,6
%A _Henry Bottomley_, Jun 13 2001