login
If A010060(n) = 1, a(n) = A000069(A268671(n)), otherwise a(n) = A001969(1+a(A006068(n)/2)).
4

%I #15 Nov 05 2016 07:27:26

%S 1,2,3,7,6,5,4,14,9,10,13,15,8,11,12,31,24,23,28,30,25,26,17,29,16,19,

%T 18,22,27,20,21,62,43,40,61,45,56,59,54,58,49,50,33,55,36,39,52,63,32,

%U 35,48,38,57,46,37,47,34,53,44,60,41,42,51,127,102,85,124,120,121,122,83,95,112,115,68,118,89,106

%N If A010060(n) = 1, a(n) = A000069(A268671(n)), otherwise a(n) = A001969(1+a(A006068(n)/2)).

%C a(n) gives the number that is in the same position in array A277880 as where n is located in array A277820.

%H Antti Karttunen, <a href="/A277902/b277902.txt">Table of n, a(n) for n = 1..16383</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

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

%F If A010060(n) = 1 [when n is one of the odious numbers, A000069], then a(n) = A000069(A268671(n)), otherwise a(n) = A001969(1+a(A006068(n)/2)).

%F As a composition of other permutations:

%F a(n) = A277880(A277821(n)).

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

%F A010060(a(n)) = A010060(n). [Preserves the parity of binary weight.]

%F a(A001317(n)) = A003945(n).

%F a(A065621(n)) = A000069(n).

%F a(A277823(n)) = A129771(n).

%F a(A277825(n)) = 2*A129771(n).

%e The top left corner of array A277820 is:

%e 1, 3, 5, 15

%e 2, 6, 10, 30

%e 7, 9, 27, 45

%e 4, 12, 20, 60

%e 13, 23, 57, 75

%e while the top left corner of A277880 is:

%e 1, 3, 6, 12

%e 2, 5, 10, 20

%e 4, 9, 18, 36

%e 7, 15, 30, 60

%e 8, 17, 34, 68

%e thus for example, a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 7, a(5) = 6, a(6) = 5, a(7) = 4, a(9) = 9, a(12) = 15, a(13) = 8 and a(27) = 18.

%o (Scheme, with memoization-macro definec)

%o (definec (A277902 n) (if (= 1 (A010060 n)) (A000069 (A268671 n)) (A001969 (+ 1 (A277902 (/ (A006068 n) 2))))))

%o (define (A277902 n) (A277880 (A277821 n)))

%Y Inverse: A277901.

%Y Cf. A000069, A001969, A001317, A003945, A006068, A010060, A065621, A129771, A268671, A277823, A277825.

%Y Related permutations and arrays: A277820, A277821, A277880.

%K nonn,base

%O 1,2

%A _Antti Karttunen_, Nov 03 2016