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.

A305877 Numbers in base 3 reversed.

Original entry on oeis.org

0, 1, 2, 1, 11, 21, 2, 12, 22, 1, 101, 201, 11, 111, 211, 21, 121, 221, 2, 102, 202, 12, 112, 212, 22, 122, 222, 1, 1001, 2001, 101, 1101, 2101, 201, 1201, 2201, 11, 1011, 2011, 111, 1111, 2111, 211, 1211, 2211, 21, 1021, 2021, 121, 1121, 2121, 221, 1221, 2221, 2
Offset: 0

Views

Author

David F. Marrs, Jun 13 2018

Keywords

Examples

			11 is 102 in base 3, and reversing it gives 201 = a(11).
		

Crossrefs

Cf. A004086 (in base 10), A007089, A030102 (when converted in base 10).

Programs

  • Maple
    a:= n-> parse(cat(convert(n, base, 3)[])):
    seq(a(n), n=0..75);  # Alois P. Heinz, Jun 17 2018
  • Mathematica
    Table[FromDigits@ Reverse@ IntegerDigits[n, 3], {n, 0, 54}] (* Giovanni Resta, Jun 13 2018 *)
  • PARI
    a(n) = fromdigits(Vecrev(digits(n, 3)), 10); \\ Michel Marcus, Jun 13 2018

Formula

a(n) = A004086(A007089(n)). - Felix Fröhlich, Jun 14 2018