login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A212529 Negative numbers in base -2. 3
11, 10, 1101, 1100, 1111, 1110, 1001, 1000, 1011, 1010, 110101, 110100, 110111, 110110, 110001, 110000, 110011, 110010, 111101, 111100, 111111, 111110, 111001, 111000, 111011, 111010, 100101, 100100, 100111, 100110, 100001, 100000, 100011, 100010, 101101, 101100, 101111, 101110, 101001, 101000, 101011, 101010, 11010101 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(n) = A039724(-n). - Reinhard Zumkeller, Feb 05 2014

LINKS

Joerg Arndt, Table of n, a(n) for n = 1..1000

Joerg Arndt, Matters Computational (The Fxtbook), p. 58-59

MAPLE

a:= proc(n) local d, i, l, m;

      m:= n; l:= NULL;

      for i from 0 while m>0 do

        d:= irem(m, 2, 'm');

        if d=1 and irem(i, 2)=0 then m:= m+1 fi;

        l:= d, l

      od; parse(cat(l))

    end:

seq(a(n), n=1..100);  # Alois P. Heinz, May 20 2012

PROG

(Haskell)

a212529 = a039724 . negate  -- Reinhard Zumkeller, Feb 05 2014

(Python)

def A212529(n):

    s, q = '', -n

    while q >= 2 or q < 0:

        q, r = divmod(q, -2)

        if r < 0:

            q += 1

            r += 2

        s += str(r)

    return int(str(q)+s[::-1]) # Chai Wah Wu, Apr 09 2016

CROSSREFS

Cf. A039724 (nonnegative numbers in base -2).

Cf. A007608 (nonnegative numbers in base -4), A212526 (negative numbers in base -4).

Cf. A005352.

Sequence in context: A063432 A038324 A164125 * A004289 A287710 A287782

Adjacent sequences:  A212526 A212527 A212528 * A212530 A212531 A212532

KEYWORD

nonn,base

AUTHOR

Joerg Arndt, May 20 2012

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 23 19:00 EST 2017. Contains 295128 sequences.