A305877 Numbers in base 3 reversed.
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
Examples
11 is 102 in base 3, and reversing it gives 201 = a(11).
Links
- David F. Marrs, Table of n, a(n) for n = 0..10000
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