login
A277902
If A010060(n) = 1, a(n) = A000069(A268671(n)), otherwise a(n) = A001969(1+a(A006068(n)/2)).
4
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, 18, 22, 27, 20, 21, 62, 43, 40, 61, 45, 56, 59, 54, 58, 49, 50, 33, 55, 36, 39, 52, 63, 32, 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
OFFSET
1,2
COMMENTS
a(n) gives the number that is in the same position in array A277880 as where n is located in array A277820.
FORMULA
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)).
As a composition of other permutations:
a(n) = A277880(A277821(n)).
Other identities. For all n >= 1:
A010060(a(n)) = A010060(n). [Preserves the parity of binary weight.]
a(A001317(n)) = A003945(n).
a(A065621(n)) = A000069(n).
a(A277823(n)) = A129771(n).
a(A277825(n)) = 2*A129771(n).
EXAMPLE
The top left corner of array A277820 is:
1, 3, 5, 15
2, 6, 10, 30
7, 9, 27, 45
4, 12, 20, 60
13, 23, 57, 75
while the top left corner of A277880 is:
1, 3, 6, 12
2, 5, 10, 20
4, 9, 18, 36
7, 15, 30, 60
8, 17, 34, 68
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.
PROG
(Scheme, with memoization-macro definec)
(definec (A277902 n) (if (= 1 (A010060 n)) (A000069 (A268671 n)) (A001969 (+ 1 (A277902 (/ (A006068 n) 2))))))
(define (A277902 n) (A277880 (A277821 n)))
CROSSREFS
Inverse: A277901.
Related permutations and arrays: A277820, A277821, A277880.
Sequence in context: A098287 A115304 A277901 * A098285 A019585 A350408
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Nov 03 2016
STATUS
approved