login
a(n) = a(n-1) + (-1)^floor(n/2)*a(floor(n/2)) with a(1) = 1.
1

%I #9 Feb 27 2020 08:49:02

%S 1,0,-1,-1,-1,0,1,0,-1,0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,0,1,0,-1,-1,-1,

%T 0,1,0,-1,0,1,1,1,0,-1,0,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,0,-1,0,1,

%U 1,1,0,-1,-1,-1,0,1,1,1,0,-1,0,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1,0,-1,0,1,1,1,0,-1,0,1,0,-1,-1,-1,0,1,0,-1,0,1,1,1,0

%N a(n) = a(n-1) + (-1)^floor(n/2)*a(floor(n/2)) with a(1) = 1.

%H Jinyuan Wang, <a href="/A089045/b089045.txt">Table of n, a(n) for n = 1..1000</a>

%F abs(a(n)) = A035263(n).

%o (PARI) lista(nn) = {my(v=vector(nn)); v[1]=1; for(n=2, nn, v[n] = v[n-1] + (-1)^floor(n/2)*v[floor(n/2)]); v; } \\ _Jinyuan Wang_, Feb 27 2020

%Y Cf. A001511, A035263.

%K sign

%O 1,1

%A _Benoit Cloitre_, Dec 02 2003