%I #11 May 25 2017 03:17:14
%S 0,1,2,3,4,11,6,5,8,9,10,29,12,13,38,33,32,35,18,7,20,15,14,17,24,23,
%T 26,27,28,83,30,31,92,87,86,89,36,37,110,39,40,119,114,113,116,99,34,
%U 101,96,95,98,105,104,107,54,19,56,21,22,65,60,59,62,45,16,47,42,41,44,51,50,53,72,25,74,69,68,71,78,77,80,81
%N Permutation of nonnegative integers: a(n) = A263272(A263273(n)).
%C Composition of A263273 with the permutation obtained from its even bisection.
%H Antti Karttunen, <a href="/A265351/b265351.txt">Table of n, a(n) for n = 0..9841</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(n) = A263272(A263273(n)).
%F As a composition of other related permutations:
%F a(n) = A264974(A265367(n)).
%F Other identities. For all n >= 0:
%F a(3*n) = 3*a(n).
%F a(n) = A265342(n)/2.
%o (Scheme) (define (A265351 n) (A263272 (A263273 n)))
%o (Python)
%o from sympy import factorint
%o from sympy.ntheory.factor_ import digits
%o from operator import mul
%o def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
%o def a038502(n):
%o f=factorint(n)
%o return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
%o def a038500(n): return n/a038502(n)
%o def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
%o def a263272(n): return a263273(2*n)/2
%o def a(n): return a263272(a263273(n)) # _Indranil Ghosh_, May 25 2017
%Y Inverse: A265352.
%Y Cf. A263272, A263273, A264974, A265367.
%Y Cf. also A265342, A265353, A265355, A265356.
%K nonn,base
%O 0,3
%A _Antti Karttunen_, Dec 07 2015