login
A269374
Permutation of natural numbers: a(1) = 1, a(n) = A255551(A001511(n), a(A003602(n))) - 1.
5
1, 2, 3, 6, 5, 4, 11, 8, 9, 10, 7, 18, 21, 28, 15, 12, 17, 22, 19, 38, 13, 16, 35, 26, 41, 58, 55, 102, 29, 40, 23, 14, 33, 46, 43, 80, 37, 52, 75, 56, 25, 34, 31, 60, 69, 100, 51, 44, 81, 118, 115, 206, 109, 160, 203, 152, 57, 82, 79, 144, 45, 64, 27, 20, 65, 94, 91, 164, 85, 124, 159, 120, 73, 106, 103, 186, 149, 220, 111, 96, 49
OFFSET
1,2
COMMENTS
Permutation obtained from the Lucky sieve.
This sequence can be represented as a binary tree. For n > 2, each left hand child is obtained by doubling the contents of the parent node and subtracting one, and each right hand child is obtained by applying A269372(n), when the parent node contains n:
1
|
...................2...................
3 6
5......../ \........4 11......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
9 10 7 18 21 28 15 12
17 22 19 38 13 16 35 26 41 58 55 102 29 40 23 14
etc.
FORMULA
a(1) = 1, a(n) = A255551(A001511(n), a(A003602(n))) - 1.
a(1) = 1, a(2n) = A269372(a(n)), a(2n+1) = (2*a(n+1))-1.
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
PROG
(Scheme, two different implementations, both using memoization-macro definec)
(definec (A269374 n) (cond ((<= n 1) n) (else (+ -1 (A255551bi (A001511 n) (A269374 (A003602 n))))))) ;; Code for A255551bi given in A255551.
(definec (A269374 n) (cond ((<= n 1) n) ((even? n) (A269372 (A269374 (/ n 2)))) (else (+ -1 (* 2 (A269374 (/ (+ n 1) 2)))))))
CROSSREFS
Inverse: A269373.
Cf. also A269375, A269377 and also A249814, A269384.
Sequence in context: A370629 A218890 A269373 * A137761 A100769 A353977
KEYWORD
nonn,tabf
AUTHOR
Antti Karttunen, Mar 01 2016
STATUS
approved