login
A260430
Involution of natural numbers: a(1) = 1, a(A257803(1+n)) = A257804(a(n)), a(A257804(n)) = A257803(1+a(n)), where A257803 and A257804 give the positions of odd and even terms in A233271, the infinite trunk of inverted binary beanstalk.
5
1, 4, 12, 2, 30, 7, 6, 74, 19, 21, 18, 3, 172, 52, 54, 49, 48, 11, 9, 383, 10, 128, 125, 32, 36, 132, 31, 119, 118, 5, 27, 24, 812, 314, 89, 25, 283, 92, 275, 76, 86, 85, 83, 290, 75, 267, 266, 17, 16, 68, 60, 14, 724, 15, 227, 1675, 219, 659, 207, 51, 64, 599, 216, 61, 232, 583, 174, 50, 204, 210, 201, 193, 208, 8, 45, 40, 1574, 612, 173, 569, 595, 159, 43
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) = A257803(1+a(A257808(n))), otherwise [when n is one of the terms of A257803] a(n) = A257804(a(A257807(n)-1)).
PROG
(Scheme, with memoizing macro definec)
(definec (A260430 n) (cond ((<= n 1) n) ((zero? (A257800 n)) (A257803 (+ 1 (A260430 (A257808 n))))) (else (A257804 (A260430 (+ -1 (A257807 n)))))))
CROSSREFS
Cf. also A233271, A257806.
Related permutations: A260431 - A260434.
Sequence in context: A370707 A104063 A374282 * A243347 A317555 A213343
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 27 2015
STATUS
approved