[go: up one dir, main page]

login
Search: a270197 -id:a270197
     Sort: relevance | references | number | modified | created      Format: long | short | data
Self-inverse permutation of natural numbers: a(1) = 1, for even n, a(n) = A250469(1+a(n/2)), for odd n, a(n) = 2*a(A268674(n)-1).
+10
6
1, 3, 2, 9, 6, 5, 18, 27, 4, 11, 10, 15, 22, 23, 12, 81, 30, 7, 162, 33, 36, 13, 14, 45, 54, 29, 8, 69, 26, 17, 138, 243, 20, 37, 46, 21, 34, 167, 44, 99, 42, 41, 198, 39, 24, 35, 82, 135, 90, 91, 60, 87, 70, 25, 66, 207, 324, 65, 174, 51, 130, 149, 72, 729, 58, 55, 102, 111, 28, 53, 110, 63, 106, 77, 108, 501, 74, 115, 126, 297, 16, 47
OFFSET
1,2
FORMULA
a(1) = 1, a(2n) = A250469(1+a(n)), a(2n+1) = 2*a(A268674(2n+1)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A269867 n) (cond ((<= n 1) n) ((even? n) (A250469 (+ 1 (A269867 (/ n 2))))) (else (* 2 (A269867 (- (A268674 n) 1))))))
CROSSREFS
Similar permutations: A269865, A269866, A270197.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 12 2016
STATUS
approved
Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A269369(1+a(n)).
+10
4
1, 2, 3, 4, 7, 6, 5, 8, 19, 14, 17, 12, 9, 10, 11, 16, 13, 38, 53, 28, 21, 34, 47, 24, 15, 18, 23, 20, 39, 22, 29, 32, 61, 26, 35, 76, 57, 106, 155, 56, 103, 42, 59, 68, 123, 94, 137, 48, 31, 30, 41, 36, 27, 46, 65, 40, 25, 78, 113, 44, 81, 58, 83, 64, 37, 122, 179, 52, 45, 70, 101, 152, 271, 114, 167, 212, 375, 310, 461, 112, 97
OFFSET
1,2
COMMENTS
This sequence can be represented as a binary tree. When the parent contains n, the left hand child contains 2n, while the value of right hand child is obtained by applying A269369(1+n):
1
|
................../ \..................
2 3
4......../ \........7 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 19 14 17 12 9 10 11
16 13 38 53 28 21 34 47 24 15 18 23 20 39 22 29
etc.
FORMULA
a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A269369(1+a(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A270195 n) (cond ((<= n 1) n) ((even? n) (* 2 (A270195 (/ n 2)))) (else (A269369 (+ 1 (A270195 (/ (- n 1) 2)))))))
CROSSREFS
Inverse: A270196.
Cf. A269369.
Related or similar permutations: A269865, A269374, A269375, A270197.
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Mar 13 2016
STATUS
approved
Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(A269369(1+n)) = 1 + 2*a(n).
+10
4
1, 2, 3, 4, 7, 6, 5, 8, 13, 14, 15, 12, 17, 10, 25, 16, 11, 26, 9, 28, 21, 30, 27, 24, 57, 34, 53, 20, 31, 50, 49, 32, 101, 22, 35, 52, 65, 18, 29, 56, 51, 42, 105, 60, 69, 54, 23, 48, 85, 114, 97, 68, 19, 106, 121, 40, 37, 62, 43, 100, 33, 98, 229, 64, 55, 202, 197, 44, 405, 70, 115, 104, 89, 130, 209, 36, 107, 58, 261, 112, 61
OFFSET
1,2
FORMULA
a(1) = 1, after which for even n, a(n) = 2*a(n/2), for odd n, a(n) = 1 + 2*a(A269370(n)-1).
PROG
(Scheme, with memoization-macro definec)
(definec (A270196 n) (cond ((<= n 1) n) ((even? n) (* 2 (A270196 (/ n 2)))) (else (+ 1 (* 2 (A270196 (- (A269370 n) 1)))))))
CROSSREFS
Inverse: A270195.
Related or similar permutations: A269866, A269373, A269376, A270197.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 13 2016
STATUS
approved

Search completed in 0.077 seconds