cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085144 a(0)=0, a(2n) = a(n)+1, a(2n+1) = -a(n).

Original entry on oeis.org

0, 0, 1, 0, 2, -1, 1, 0, 3, -2, 0, 1, 2, -1, 1, 0, 4, -3, -1, 2, 1, 0, 2, -1, 3, -2, 0, 1, 2, -1, 1, 0, 5, -4, -2, 3, 0, 1, 3, -2, 2, -1, 1, 0, 3, -2, 0, 1, 4, -3, -1, 2, 1, 0, 2, -1, 3, -2, 0, 1, 2, -1, 1, 0, 6, -5, -3, 4, -1, 2, 4, -3, 1, 0, 2, -1, 4, -3, -1, 2, 3, -2, 0, 1, 2
Offset: 0

Views

Author

Ralf Stephan, Jun 20 2003

Keywords

Comments

Local maxima are a(2^k) = k, minima are a(2^k+1) = -k+1.

Crossrefs

Zeros are in A085145. Cf. A004718, A010060, A059448.

Programs

  • Haskell
    import Data.List (transpose)
    a085144 n = a085144_list !! n
    a085144_list = 0 : concat
       (transpose [map negate a085144_list, map (+ 1) $ tail a085144_list])
    -- Reinhard Zumkeller, Mar 18 2015