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.

A035523 Reverse and add (in base 3).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 96, 160, 320, 960, 1600, 2880, 3520, 6080, 11200, 21440, 62400, 86080, 169280, 338560, 648248, 1902840, 3281200, 6404832, 6510784, 12950936, 25744192, 51882584, 156278688, 261609208, 506142216, 531792640, 1008314456, 2014504120
Offset: 0

Views

Author

Keywords

Examples

			32 = 1012, 1012 + 2101 = 10120 = 96.
		

Crossrefs

Cf. A035522.

Programs

  • Maple
    A035523 := proc(n)
        option remember;
        if n =1 then
            1;
        else
            A055946(procname(n-1)) ;
        end if;
    end proc: # R. J. Mathar, May 28 2016
  • Mathematica
    NestList[ (Fold[ 3 #1+#2&, 0, Reverse@IntegerDigits[ #, 3 ] ]+#&), 1, 40 ]
    Join[{m = 1}, Table[m = m + FromDigits[Reverse[IntegerDigits[m, 3]], 3], {35}]] (* T. D. Noe, May 02 2012 *)
    NestList[#+IntegerReverse[#,3]&,1,40] (* The program uses the IntegerRevese function from Mathematica version 10 *) (* Harvey P. Dale, Feb 21 2016 *)
  • 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
    A035523_list, l = [1], 1
    for _ in range(50):
        l += reversedigits(l, 3)
        A035523_list.append(l)
     # Chai Wah Wu, Jan 03 2015

Formula

a(n) = A055946(a(n-1)). - R. J. Mathar, May 28 2016

Extensions

More terms from Wouter Meeussen