login
A126135
Take the base-3 representation of n, render that in decimal notation and take the base-3 representation of n again.
0
0, 1, 2, 101, 102, 110, 202, 210, 211, 10201, 10202, 10210, 11002, 11010, 11011, 11110, 11111, 11112, 21102, 21110, 21111, 21210, 21211, 21212, 22011, 22012, 22020, 1101001, 1101002, 1101010, 1101102, 1101110, 1101111, 1101210, 1101211, 1101212, 1111202, 1111210
OFFSET
0,3
EXAMPLE
a(4) is 102 because the base-3 representation of 4 is 11 and the base-3 representation of the decimal number 11 is 102.
MATHEMATICA
f3[a_]:=FromDigits[IntegerDigits[a, 3]]; Table[f3[f3[n]], {n, 0, 37}] (* James C. McMahon, Dec 25 2024 *)
PROG
(PARI) a(n) = fromdigits(digits(fromdigits(digits(n, 3)), 3)); \\ Michel Marcus, Dec 25 2024
CROSSREFS
Cf. A007089.
Sequence in context: A102188 A225601 A332567 * A016034 A171988 A100669
KEYWORD
base,nonn
AUTHOR
Anonymous, Dec 18 2006
EXTENSIONS
a(6) inserted and a(15)-a(37) from James C. McMahon, Dec 25 2024
STATUS
approved