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.

A035526 Reverse and add (in binary).

Original entry on oeis.org

1, 10, 11, 110, 1001, 10010, 11011, 110110, 1010001, 10010110, 11111111, 111111110, 1011111101, 10111111010, 100011110111, 1011111101000, 1101011100101, 10111111010000, 11001011001101, 101111110100000
Offset: 0

Views

Author

N. J. A. Sloane, E. M. Rains

Keywords

Comments

First 4 members are the divisors of 6 (the first perfect number), written in base 2 (see A135652, A135653, A135654, A135655). - Omar E. Pol, May 04 2008

Examples

			110 + 011 = 1001.
		

Crossrefs

Cf. A035522 for same sequence but written in base 10.
Cf. A007088.

Programs

  • Haskell
    a035526 = a007088 . a035522  -- Reinhard Zumkeller, Jan 02 2015
    
  • Python
    from itertools import accumulate, repeat
    def iterate(n, _): b = str(n); return int(bin(int(b, 2)+int(b[::-1], 2))[2:])
    def aupto(nn): return list(accumulate(repeat(1, nn), iterate))
    print(aupto(20)) # Michael S. Branicky, Jan 10 2021

Formula

a(n) = A007088(A035522(n)). - Reinhard Zumkeller, Jan 02 2015