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!)
A065360 Alternating sum of "negabits". Replace (-2)^k with (-1)^k in negabinary expansion of n. 2
1, 0, 1, 1, 2, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, -2, -1, -1, 0, -1, 0, 0, 1, -1, 0, 0, 1, 0, 1, 1, 2, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, -1, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 3, 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, -3, -2, -2, -1, -2, -1, -1, 0, -2, -1, -1, 0, -1, 0, 0, 1, -2, -1, -1, 0, -1, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Notation: (-2)[n](-1)
LINKS
EXAMPLE
6 = 11010 -> +(1)-(1)+(0)-(1)+(0) = -1 = a(6).
PROG
(PARI) negab(n)=if(n, negab(n\(-2))*10+bittest(n, 0)); \\ A039724
a(n) = my(d=Vecrev(digits(negab(n)))); sum(k=1, #d, d[k]*(-1)^(k-1)); \\ Michel Marcus, Aug 28 2019
CROSSREFS
Sequence in context: A060564 A031267 A247763 * A352512 A364032 A333397
KEYWORD
base,easy,sign
AUTHOR
Marc LeBrun, Oct 31 2001
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)