login
A265902
Self-inverse permutation of nonnegative integers: a(n) = A263273(A263272(A263273(n))).
3
0, 1, 2, 3, 4, 19, 6, 7, 8, 9, 10, 55, 12, 13, 58, 57, 64, 73, 18, 5, 20, 21, 22, 25, 24, 23, 26, 27, 28, 163, 30, 37, 172, 165, 190, 217, 36, 31, 166, 39, 40, 175, 174, 193, 220, 171, 46, 181, 192, 199, 226, 219, 208, 235, 54, 11, 56, 15, 14, 59, 60, 65, 74, 63, 16, 61, 66, 67, 76, 75, 70
OFFSET
0,3
FORMULA
a(n) = A263273(A263272(A263273(n))).
As a composition of related permutations:
a(n) = A263273(A265351(n)).
a(n) = A265352(A263273(n)).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
MATHEMATICA
f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; t = Table[f[2 n]/2, {n, 0, 1000}]; Table[f[t[[f@ n + 1]]], {n, 0, 83}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A263273 *)
PROG
(Scheme) (define (A265902 n) (A263273 (A263272 (A263273 n))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 02 2016
STATUS
approved