login
Take the base-3 representation of n, render that in decimal notation and take the base-3 representation of n again.
0

%I #10 Dec 25 2024 15:02:36

%S 0,1,2,101,102,110,202,210,211,10201,10202,10210,11002,11010,11011,

%T 11110,11111,11112,21102,21110,21111,21210,21211,21212,22011,22012,

%U 22020,1101001,1101002,1101010,1101102,1101110,1101111,1101210,1101211,1101212,1111202,1111210

%N Take the base-3 representation of n, render that in decimal notation and take the base-3 representation of n again.

%e 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.

%t f3[a_]:=FromDigits[IntegerDigits[a,3]];Table[f3[f3[n]],{n,0,37}] (* _James C. McMahon_, Dec 25 2024 *)

%o (PARI) a(n) = fromdigits(digits(fromdigits(digits(n,3)), 3)); \\ _Michel Marcus_, Dec 25 2024

%Y Cf. A007089.

%K base,nonn

%O 0,3

%A Anonymous, Dec 18 2006

%E a(6) inserted and a(15)-a(37) from _James C. McMahon_, Dec 25 2024