The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A303404 a(0) = 0, a(1) = 1; for n >= 1, a(2*n) = a(2*n-1) - 2*a(n), a(2*n+1) = n - 2*a(n). 4
0, 1, -1, -1, 1, 4, 6, 5, 3, 2, -6, -3, -15, -6, -16, -3, -9, 2, -2, 5, 17, 22, 28, 17, 47, 42, 54, 25, 57, 46, 52, 21, 39, 34, 30, 13, 17, 22, 12, 9, -25, -14, -58, -23, -79, -34, -68, -11, -105, -70, -154, -59, -167, -82, -132, -23, -137, -86, -178, -63, -167, -74, -116, -11, -89, -46, -114, -35, -95, -26, -52, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
Inspired by A002487.
A020714 is generally determinative for block structures of this sequence.
LINKS
FORMULA
G.f. g(x) satisfies g(x) + 2*g(x^2)*(1+x+x^2) = x + x^2 + x^3 + x^4 + 2*x^5. - Robert Israel, Aug 20 2018
MAPLE
A[0]:= 0: A[1]:= 1:
for n from 1 to 50 do
A[2*n]:= A[2*n-1]-2*A[n];
A[2*n+1]:= n - 2*A[n]
od:
seq(A[i], i=0..101); # Robert Israel, Aug 20 2018
PROG
(PARI) a(n)=if(n<=1, n, if(n%2==0, a(n-1)-2*a(n/2), (n-1)/2-2*a((n-1)/2)));
CROSSREFS
Sequence in context: A222069 A274318 A256682 * A002245 A062117 A200497
KEYWORD
sign,look
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 June 7 14:16 EDT 2024. Contains 373182 sequences. (Running on oeis4.)