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!)
A318163 a(0) = a(3) = 0, a(1) = a(2) = 1; for n >= 2, a(2*n) = -a(n-1) and a(2*n+1) = -a(n-1)-a(n). 1
0, 1, 1, 0, -1, -2, -1, -1, 0, 1, 1, 3, 2, 3, 1, 2, 1, 1, 0, -1, -1, -2, -1, -4, -3, -5, -2, -5, -3, -4, -1, -3, -2, -3, -1, -2, -1, -1, 0, 1, 1, 2, 1, 3, 2, 3, 1, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, -1, -1, -2, -1, -3, -2, -3, -1, -4, -3, -5, -2, -5, -3, -4, -1, -6, -5, -9, -4, -11, -7 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
Inspired by A002487.
Alternatively, a(0) = 0, a(1) = 1; for n >= 1, a(2*n) = a(2*n-1) - a(2*n-2), a(2*n+1) = a(2*n) - a(n). Note that if b(0) = 0, b(1) = 1; for n >= 1, b(2*n) = b(2*n-1) - b(n), b(2*n+1) = b(2*n) - b(2*n-1), then b(n) + A213369(n+1) = 0 for all n >= 1.
The main block structure of this sequence is described by A020714.
LINKS
FORMULA
a(5*2^k-2) = 0 for all k >= 0.
MATHEMATICA
a[0]=a[3]=0; a[1]=a[2]=1; a[n_] := a[n] = If[EvenQ[n], -a[n/2-1], -a[(n-1)/2 - 1] - a[(n-1)/2]]; Array[a, 101, 0] (* Giovanni Resta, Aug 27 2018 *)
PROG
(PARI) a = vector(100); print1(0", "); for(k=1, #a, print1 (a[k]=if(k<=2, 1, my (n=k\2); if (k%2==0, -a[n-1], a[2*n]-a[n]))", "));
CROSSREFS
Sequence in context: A096651 A209354 A294446 * A114640 A056890 A321519
KEYWORD
sign,easy
AUTHOR
Altug Alkan, Aug 19 2018
STATUS
approved

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 16 18:12 EDT 2024. Contains 371750 sequences. (Running on oeis4.)