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.

A035524 Reverse and add (in base 4).

Original entry on oeis.org

1, 2, 4, 5, 10, 20, 25, 50, 85, 170, 340, 425, 850, 1385, 3070, 6140, 10225, 15335, 29410, 65135, 129070, 317675, 1280860, 2163725, 3999775, 7999550, 20321515, 81946460, 138412045, 255852575, 511705150, 1300234475, 5242880860
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A035522.
Cf. A030103.

Programs

  • Haskell
    a035524 n = a035524_list !! n
    a035524_list = iterate a055948 1
    -- Reinhard Zumkeller, Oct 10 2011
    
  • Mathematica
    nxt4[n_]:=Module[{idn4=IntegerDigits[n,4]},FromDigits[idn4+ Reverse[idn4], 4]]; NestList[nxt4,1,40] (* Harvey P. Dale, May 02 2011 *)
  • Python
    def reversedigits(n, b=10): # reverse digits of n in base b
        x, y = n, 0
        while x >= b:
            x, r = divmod(x, b)
            y = b*y + r
        return b*y + x
    A035524_list, l = [1], 1
    for _ in range(50):
        l += reversedigits(l,4)
        A035524_list.append(l)

Formula

a(n+1) = A055948(a(n)), a(0) = 1. [Reinhard Zumkeller, Oct 10 2011]

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 22 2000