login
A260431
Permutation of natural numbers: a(1) = 1, a(A257804(n)) = 2*a(n), a(A257803(1+n)) = 1 + 2*a(n), where A257804 and A257803 give the positions of even and odd terms in A233271, the infinite trunk of inverted binary beanstalk.
5
1, 2, 4, 3, 8, 6, 5, 16, 9, 12, 10, 7, 32, 18, 24, 20, 17, 13, 14, 64, 11, 36, 33, 19, 25, 48, 21, 40, 34, 15, 26, 28, 128, 65, 37, 22, 72, 49, 66, 38, 41, 35, 50, 96, 42, 80, 68, 30, 27, 52, 56, 29, 129, 23, 73, 256, 67, 130, 74, 39, 44, 144, 98, 51, 97, 132, 76, 43, 82, 81, 70, 100, 69, 31, 53, 57, 257, 192, 84, 160, 131, 75, 45, 136, 60, 54
OFFSET
1,2
FORMULA
a(1) = 1; for n > 1, if A257800(n) = 0 [when n is one of the terms of A257804] a(n) = 2*a(A257808(n)), otherwise [when n is one of the terms of A257803] a(n) = 1 + 2*a(A257807(n)-1).
As a composition of other permutations:
a(n) = A054429(A260433(n)).
a(n) = A260433(A260430(n)).
PROG
(Scheme, with memoizing macro definec)
(definec (A260431 n) (cond ((<= n 1) n) ((zero? (A257800 n)) (* 2 (A260431 (A257808 n)))) (else (+ 1 (* 2 (A260431 (+ -1 (A257807 n))))))))
CROSSREFS
Inverse: A260432.
Related permutations: A260433, A260430, A054429.
Cf. also A257806.
Sequence in context: A248513 A266414 A245613 * A376738 A333484 A334434
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 27 2015
STATUS
approved