A035526 Reverse and add (in binary).
1, 10, 11, 110, 1001, 10010, 11011, 110110, 1010001, 10010110, 11111111, 111111110, 1011111101, 10111111010, 100011110111, 1011111101000, 1101011100101, 10111111010000, 11001011001101, 101111110100000
Offset: 0
Examples
110 + 011 = 1001.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
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
Comments