login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089045 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)