login
Self-inverse permutation of nonnegative integers: a(n) = A263273(A057889(A263273(n))).
9

%I #15 May 25 2017 03:16:51

%S 0,1,2,3,4,5,6,7,8,9,10,17,12,19,26,15,16,11,18,13,20,21,22,55,24,25,

%T 14,27,28,65,30,67,32,39,38,35,36,37,34,33,40,145,42,73,100,45,46,61,

%U 48,79,226,219,76,121,54,23,56,57,70,59,60,47,82,63,64,29,66,31,68,81,58,217,72,43,74,75,52,193,174,49,80,69,62,221

%N Self-inverse permutation of nonnegative integers: a(n) = A263273(A057889(A263273(n))).

%H Antti Karttunen, <a href="/A265329/b265329.txt">Table of n, a(n) for n = 0..16384</a>

%H Indranil Ghosh, <a href="/A265329/a265329.txt">Python program to generate the sequence</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(n) = A263273(A057889(A263273(n))).

%F As a composition of related permutations:

%F a(n) = A264965(A263273(n)).

%F a(n) = A263273(A264966(n)).

%F Other identities. For all n >= 0:

%F A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

%t 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]]]; g[n_] := FromDigits[Reverse@ IntegerDigits[n, 2], 2] 2^IntegerExponent[n, 2]; Prepend[#, 0] &@ Table[f@ g@ f@ n, {n, 83}] (* _Michael De Vlieger_, Jan 04 2016, after _Jean-François Alcover_ at A263273 and _Ivan Neretin_ at A057889 *)

%o (Scheme) (define (A265329 n) (A263273 (A057889 (A263273 n))))

%Y Cf. A000035, A057889, A263273, A264965, A264966.

%Y Cf. A266402, A266404.

%Y Cf. also A265369.

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Jan 02 2016